Skip to content
This repository has been archived by the owner on Apr 8, 2020. It is now read-only.

How do I programmatically re-calculate the handles' position? #126

Open
dhardtke opened this issue May 2, 2014 · 5 comments
Open

How do I programmatically re-calculate the handles' position? #126

dhardtke opened this issue May 2, 2014 · 5 comments

Comments

@dhardtke
Copy link

dhardtke commented May 2, 2014

See title - would like to find out how.

Thanks.

@dhardtke
Copy link
Author

No one has an idea on this one?
If I change the size of a shape that is currently selected (i.e. FreeTransform is currently enabled and visible) the handles' position is incorrect, so I want to recalculate and reposition them..

there must be a way of doing this?!

@cymen
Copy link

cymen commented Jul 14, 2014

@dhardtke How are you changing the size? Are you doing it via FreeTransform with attrs.scale and such or are you doing it outside of FreeTransform? It might be easier doing it via FreeTransform because then the handles should get updated automatically.

@dhardtke
Copy link
Author

I know that, but for example if I change the font-size attribute of a node then the handles of course don't update and therefore are wrongly positioned.. :(

@cymen
Copy link

cymen commented Jul 14, 2014

@dhardtke Ah! Sorry, I wasn't sure if I could help but thought I'd point that out just in case. It might work well to hard code the font size and then scale it. So pick a font size that looks reasonably good at large sizes and then scale it down using freeTransform instead of switching the font size. That isn't a very satisfying solution and I could see cases in which it would not work but maybe it will work for you?

@MobilesInMobile
Copy link

@cymen How do I re-calculate the handles for text element when text has been changed? Thanks!

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

No branches or pull requests

3 participants