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

Percentage offset #1873

Open
EskelCz opened this issue Jan 13, 2025 · 0 comments
Open

Percentage offset #1873

EskelCz opened this issue Jan 13, 2025 · 0 comments

Comments

@EskelCz
Copy link

EskelCz commented Jan 13, 2025

Thanks for this awesome library! I have a feature request.

I'm adding a text of a user defined length, which I need to be centred in the viewport, therefore I need to set the offsetX to half of the width.

That in svelte is pretty convoluted, as I have to have an $effect to watch for the moment of the shape being added (I could use a konva effect here), then get the handle and calculate and set the offset.

Instead it could be as simple as <Text offsetX='50%' /> with a support for percentages. I feel it would be generally useful.
Thanks for your consideration.

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

No branches or pull requests

1 participant