svgdotjs / svg.js

The lightweight library for manipulating and animating SVG
https://svgjs.dev
Other
10.95k stars 1.07k forks source link

rotate is not working with transform #1286

Closed patson12 closed 10 months ago

patson12 commented 1 year ago

Hello,

i am working on rotate element with left top corner and right left corner likewise all.. and i have added following code .. its working on if rotate angle less than 180.. its working fine if i make rotate: 90 or rotate: 120 but if i increase value like 360 , 720.. its not working.. plz have a look on my code

regards harshad

 scaleele.animate(2000).transform({
    rotate: 320,
    origin: "top left",
  });
kelvinsekx commented 1 year ago

This should have worked. But an alternative approach is to rotate like in the example below

scaleele.animate(2000).rotate(320)
Fuzzyma commented 10 months ago

as @kelvinsekx said already, your code works as intended. If you think you found a bug, please provide a minimal example which showcases the bug