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

Transform animation of the skewY will change the coordinates #1222

Open
simon-ritchie opened this issue Oct 5, 2021 · 1 comment
Open

Transform animation of the skewY will change the coordinates #1222

simon-ritchie opened this issue Oct 5, 2021 · 1 comment

Comments

@simon-ritchie
Copy link

Bug report

Fiddle

https://jsfiddle.net/pd1u98nk/2/

Explanation

When I use the animation of the transform with skewY setting, the coordinates change. Conversely, skewX animation and no-animation skewY does not change the coordinates (expected behavior). Maybe skewY with animation does not work correctly.

Unexpected coordinates change with the skewY animation:

https://jsfiddle.net/pd1u98nk/2/

var canvas = SVG().addTo('#canvas').size('100%', '100%')

rect = canvas.rect(100, 100).move(100, 100).fill('blue')
rect.animate().transform({skewY: 50})

image

Expected coordinates (no-animation skewY updating):

https://jsfiddle.net/och3udyr/

var canvas = SVG().addTo('#canvas').size('100%', '100%')

rect = canvas.rect(100, 100).move(100, 100).fill('blue')
rect.skew(0, 50);

image

SkewX animation also works correctly (no coordinates change):

https://jsfiddle.net/pd1u98nk/3/

var canvas = SVG().addTo('#canvas').size('100%', '100%')

rect = canvas.rect(100, 100).move(100, 100).fill('blue')
rect.animate().transform({skewX: 50})

image

@Fuzzyma
Copy link
Member

Fuzzyma commented Oct 5, 2021

rect.animate().transform({skewY: 50}) and rect.animate().skew(0, 50) also yield different results. very strange

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

No branches or pull requests

2 participants