-
Notifications
You must be signed in to change notification settings - Fork 2k
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
getBounds returns unexpected result after caching with a non-1 scale #1064
Comments
Thanks for reporting @onedrop. Looking into it. |
Sorry @onedrop - lost this thread. When I set the bounds before caching it works fine. I am really not sure where the bounds are coming from in the first place. It has been my experience with Animate that movieclips do not have bounds set - or at least I have always had to manually set them. For instance, if I put a circle MovieClip on the stage and ask for getBounds() it returns null for me. So why did your Rectangle think it had bounds? What did you do differently?
|
If you call cache() on a MovieClip and provide a non-1 value for the scale parameter, you will get an unexpected result when retrieving its bounds afterwards via getBounds(). The resulting width and height of the bounds object seem to be incorrectly divided by the scale the clip was cached at.
See barebones example here...
https://jsbin.com/kazoreseri/edit?html,output
@danzen @lannymcnie
The text was updated successfully, but these errors were encountered: