Closed bytasv closed 1 year ago
All / latest
Hey there 👋 I was wondering - how difficult would it be to add values for selectedRanges like so (see blue titles on the edge):
selectedRanges
Maybe something like this:
selectedRangesText={true|false}
selectedRangesTextOffset={[x, y]}
textOffset={[x, y]}
selectedRangesTextColor
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?)
@bytasv
ruler, guides's new version is released. selectedRangesText, selectedRangesTextOffset, selectedRangesTextColor props are added. Try it.
ruler
guides
selectedRangesText
selectedRangesTextOffset
Thanks alot! 🙇
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):Maybe something like this:
selectedRangesText={true|false}
selectedRangesTextOffset={[x, y]}
(so to maintain the same API astextOffset={[x, y]}
selectedRangesTextColor
(so to maintain the same API astextColor='#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?)