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

Option to render selectedRange values #38

Closed
bytasv opened this issue Jan 29, 2023 · 2 comments
Closed

Option to render selectedRange values #38

bytasv opened this issue Jan 29, 2023 · 2 comments

Comments

@bytasv
Copy link

bytasv commented Jan 29, 2023

Environments

All / latest

Description

Hey there 👋 I was wondering - how difficult would it be to add values for selectedRanges like so (see blue titles on the edge):

CleanShot 2023-01-29 at 14 54 13@2x

Maybe something like this:

  • new prop selectedRangesText={true|false}
  • new prop selectedRangesTextOffset={[x, y]} (so to maintain the same API as textOffset={[x, y]}
  • new prop selectedRangesTextColor (so to maintain the same API as textColor='#xxx'

https://github.com/daybrush/ruler/blob/master/packages/react-ruler/src/react-ruler/Ruler.tsx#L206
(I'm not familiar with drawing in canvas, but maybe it would be easy then to draw text on each side of selected range?)

@daybrush
Copy link
Owner

daybrush commented Mar 4, 2023

@bytasv

ruler, guides's new version is released. selectedRangesText, selectedRangesTextOffset, selectedRangesTextColor props are added. Try it.

@bytasv
Copy link
Author

bytasv commented Mar 8, 2023

Thanks alot! 🙇

@bytasv bytasv closed this as completed Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants