polotno-project / polotno-board

Roadmap and bug-tracker for the Polotno project.
https://polotno.dev/
9 stars 1 forks source link

Implement `group` element #2

Closed lavrton closed 1 year ago

lavrton commented 3 years ago

group element can be used for ... well ... grouping several elements. Now the question is how to better manage transforms. Should the group have its own x, y and rotation? All they will be all inside children elements.

iamsterdam800 commented 2 years ago

Great feature! Many editors have it and yes, normally the group has its own x, y, scale, rotation, etc. that are of a "bounding box" of the child elements. And the children have their attribute values relative to the group's values. Say the group is {x:100, y:50, scale: 0.5, rotation: 45} and a child is {x:20, y:10, scale: 3, rotation: 15}. Then when the child is drawn, its effective attributes would be {x:120, y:60, scale: 1.5, rotation: 60}.

lavrton commented 1 year ago

Closing the issue for now.

First iteration of groups are implemented. Currently, groups don't have x, y and rotation. That will be the next iteration.