-
Notifications
You must be signed in to change notification settings - Fork 27
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
Changing SVG Path at runtime #56
Comments
I did some more tests, and after setting the "svgPath" value string on a SVGElement, I see that render() is not being called. |
Yes. You can call invalidate methods. To change the flag. |
InvalidateRender, to be more specific |
I'm doing something like this
however there is no change in the SVG render output but if I do
I do see some change in the SVG but its not the desired result as per my requirements. Further to this is there an event that will tell me that the new path has finished rendering. |
Thanks for the info, I used the validate event but it seems the correct bounds of the object is still not computed after validate() it still reports the old bounds. My code is like so
The in my validate event callback
|
Is there a way to dynamically change the path property of the SVGElement at runtime.
I have a main SVG that I rendered on stage and it has many SVGElements.
I want to change the path of one of the SVGElement, so I tried using the "svgPath" property which is a string.
I am trying to set a path string to this property, but my issue is that the path string I take from another SVG which has different co-ordinates so I don't think it draws the path at the correct location and scale.
In short I would like to take a path from one SVG and overwrite another SVG's SVGElement path with that one.
Is this currently possible?
The text was updated successfully, but these errors were encountered: