microsoft / microsoft/maker.js

childrenOnChain Problem

Open
#470 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2k
Forks
302
Avg merge
21h 28m
Merged PRs (30d)
5

Description

Hey!

I'm playing around with layout.childrenOnChain and have question how to accomplish following task:

There is a curved path id like to use to position my text on it. Just like childrenOnChain.
The only problem is, that this method is built for text who covers the whole chain.

Example:

Text: Foobaafooba
Text on Path: F_o_o_b_a_a_f_o_o_b_a

Text: Foo
Text on Path: F___________o__________o

But I want to center on the path like:

Text on Path: Foo

here are Screenshots from the playground

Bildschirmfoto 2020-08-05 um 13 02 44

I hack fix it with pre- and post characters with spaces:
But that's too hacky for my choice

Bildschirmfoto 2020-08-05 um 13 03 21

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the layout.childrenOnChain entry point and its surrounding text-on-path behavior. Confirm how shorter text is currently distributed along a curved path, then define the centered placement expected by the examples. Done means the API supports centered shorter text without requiring padding characters, with coverage for the demonstrated cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.