Skip to content

Transform animation of the skewY will change the coordinates #1222

@simon-ritchie

Description

@simon-ritchie

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions