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

[bug] Group centeredRotation: false is not working #5113

Closed
KeySeeDev opened this issue Jul 20, 2018 · 6 comments · Fixed by #5143
Closed

[bug] Group centeredRotation: false is not working #5113

KeySeeDev opened this issue Jul 20, 2018 · 6 comments · Fixed by #5143

Comments

@KeySeeDev
Copy link

KeySeeDev commented Jul 20, 2018

I was trying to rotate a group arround a custom origin,
But the rendering is not working. Do you have any fix for this?
Thanks

var group = new fabric.Group([circle1, circle2, circle3], {
left: 250, top: 200,
centeredRotation: false,
originX: 0.5, originY: 0.5,
rotate: 20
});

Version

2.3.0

Test Case

http://jsfiddle.net/StarStep/anwjhs2o/243/

image

@KeySeeDev KeySeeDev changed the title [bug] Group centeredRotation:false bug [bug] Group centeredRotation: false is not working Jul 20, 2018
@durga598
Copy link
Contributor

Here is updated fiddle, u had provided wrong origin values.

@KeySeeDev
Copy link
Author

KeySeeDev commented Jul 20, 2018

@durga598 thanks for the interest 😄But the values I provided, I still think are correct :]
I'm trying to rotate the entire group around a different origin from center or top-left corner.
When i specified "originX: 0.5, originY: 0.5" i wanted to show that it wont rotate correctly even than.
You can try with other values too... for example try to rotate it around the right-middle point
Here another example: http://jsfiddle.net/StarStep/anwjhs2o/253/
Hope that this time the issue is more clear.

@durga598
Copy link
Contributor

For more about origin values check.

@asturur
Copy link
Member

asturur commented Jul 21, 2018

I understand the bug, while numeric origins works for positioning, they are currently not working for rotation.

Scaling and skewing have always a forced origin OR the center, while rotation has the origin OR the object origin point.
Needs a fix and an updated to docs and demo.

@asturur
Copy link
Member

asturur commented Jul 23, 2018

Ok i chased the wrong bug.
I read the issue fast, then i was 8 hour on a plane with no internet and i tried to fix the rotation that indeed work great. Here the problem is group creation.

@KeySeeDev
Copy link
Author

Thanks for the help! I would like to do something but I'm not that good yet 😋

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

Successfully merging a pull request may close this issue.

3 participants