Fabric.js: [bug] Group centeredRotation: false is not working

Created on 20 Jul 2018  路  6Comments  路  Source: fabricjs/fabric.js

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

bug docs

All 6 comments

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

@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.

For more about origin values check.

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.

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.

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

Was this page helpful?
0 / 5 - 0 ratings