Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add textLength prop to TextPath TSpan #2414

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

bohdanprog
Copy link
Member

@bohdanprog bohdanprog commented Aug 19, 2024

Summary

Motivation: We want to add that feature.
Closes #1767

example with TextPath component

Test Plan

The example is available in the test-examples app as Test1693

What are the steps to reproduce (after prerequisites)?

Compatibility

OS Implemented
iOS
Android
Web
MacOS

@bohdanprog bohdanprog requested a review from jakex7 August 27, 2024 06:19
@bohdanprog bohdanprog self-assigned this Aug 27, 2024
@bohdanprog bohdanprog marked this pull request as ready for review August 27, 2024 06:19
@jakex7
Copy link
Member

jakex7 commented Aug 27, 2024

Great, but it still doesn't seem to work on either Text or TextPath
image

<Svg viewBox="0 0 200 200">
  <Path d="M 50, 100 a 50,50 0 1,0 100,0 a 50,50 0 1,0 -100,0 Z" fill="red"/>
  <Path d="M 50, 100 a 50,50 0 1,0 100,0 a 50,50 0 1,0 -100,0 Z" fill="red" id="path"/>
  <Text fill="blue" textLength="314">
    <TextPath href="#path">
      We go up and down,
      <TSpan fill="green">
        then up again
      </TSpan>
    </TextPath>
  </Text>
</Svg>

In the example above it only works when textLength is set on TSpan

EDIT: It doesn't matter if textLength is set to Text or TextPath.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

textLength not working
2 participants