Skip to content

Feature request: container elements (<svg>, <g>) fitting the size and position of their descendants' bounding box when grouped & container descendants' transform staying the same when ungrouped

container elements fitting the size and position of their descendants' bounding box when grouped

The <svg> element would set its width, height, and position according to the bounding box of its descendants when those descendants are grouped by any means (Ctrl + G for example). The <g> element would set its position according to the bounding box of its descendants when those descendants are grouped by any means.

This is how you create relative positional hierarchies where sub-elements are contained by their parents and you can have a reference location for inserting new elements next to those sub-elements with relative coordinates. What happens now in Inkscape is that when you group some elements, the origin of the group is located somewhere unrelated to its descendants. It would then be useful to have a toggle button to turn on the functionality for when the elements are grouped, the group doesn't start at (0,0), but at the top-left corner of its descendant's bounding box. The descendants are then translated so that they stay in place in screen-coordinates.

container descendants' transform staying the same when ungrouped

Currently, in a container, the descendants' transformation matrix changes to keep the screen coordinates the same when ungrouped. It would be useful to have a toggle button to turn on the functionality for when a container element is ungrouped, its descendants' transformation matrix stay the same. Only the dedent button in the XML editor has this functionality but not the ungroup function.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information