You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This takes the initial coordinates, and adds the offsets to them. However, shiftedBounds also copies width and height from the initial bounds to the final bounds. This can break an animation if a sprite's dimensions change.
you'll see that the size does transition (the position animation looks buggy though because of the fact that we're changing the initial bounds entirely):
Expected behavior startTranslatedBy and endTranslatedBy should only change the x/y coordinates, not the dimensions.
The text was updated successfully, but these errors were encountered:
Describe the bug
startTranslatedBy
andendTranslatedBy
work by using theshiftedBounds
function to generate a new boundsDOMRect
.Let's look at
endTranslatedBy
:This takes the initial coordinates, and adds the offsets to them. However,
shiftedBounds
also copieswidth
andheight
from the initial bounds to the final bounds. This can break an animation if a sprite's dimensions change.To Reproduce
You can add
in one of the ember-animated docs examples:
ember-animated/docs/app/pods/docs/between/detail/controller.js
Line 18 in 84a6e17
If you then also override the initial bounds sizes:
you'll see that the size does transition (the position animation looks buggy though because of the fact that we're changing the initial bounds entirely):
Expected behavior
startTranslatedBy
andendTranslatedBy
should only change the x/y coordinates, not the dimensions.The text was updated successfully, but these errors were encountered: