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

Question: keep shape size constant during zooming #101

Open
mani76 opened this issue Nov 11, 2015 · 1 comment
Open

Question: keep shape size constant during zooming #101

mani76 opened this issue Nov 11, 2015 · 1 comment
Assignees
Milestone

Comments

@mani76
Copy link

mani76 commented Nov 11, 2015

Hello,

What would be the best option to implement shape whose location is anchored to the other shape but which does not change zooming when layer is transformed.

I have arrow shape which have also text shape and both are attached to the transformable layer. How do I keep the text size constant even if layer is zoomed. Text location must still change according to the arrow location but only the zooming must be constant.

@SprocketNYC SprocketNYC added this to the 2.1 milestone Nov 19, 2015
@SprocketNYC SprocketNYC self-assigned this Nov 19, 2015
@SprocketNYC
Copy link
Contributor

This is doable but tricky, I can create a flag that says "don't transform" from some level, but obviously, part of the transformation of the viewport modifies not just the shapes size, but it's x/y position on the screen. So we have to extract the x,y position out of the zoom transformation, cancel the rest, and patch up the x,y coordinates. I have it in 2.1 and will definitely look into it.

romartin added a commit to romartin/lienzo-core that referenced this issue Apr 29, 2020
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