jgraph / drawio

draw.io is a JavaScript, client-side editor for general diagramming.
https://www.drawio.com
Other
40.84k stars 7.59k forks source link

Use of resizable but not moveable inside composite objects #4622

Open mccullerlp opened 1 month ago

mccullerlp commented 1 month ago

Is your feature request related to a problem? Please describe. This feature/issue is related to the use of composite objects where the child is inside of a parent, but intended to no longer be movable. Thus the parent is supposed to be the fundamental object. The desire is to disable editing the interior child objects, while also allowing them to resize and rescale with the parent. Currently, resizing and rescaling the parent works well, but only if the child objects have both resizable and movable flags enabled. If the movable flag is disabled on the child objects, resizing the parent will fail to scale their locations.

Describe the solution you'd like Child objects with resizable-on and movable-off should have their locations scale with the parent object.

Describe alternatives you've considered Other methods to implement composite objects such as disabling editing on interior child objects does not seem to work either. This pair of flags has the intended behavior.

Additional context With the parent having "connectable-off", this allows one to make composite objects with node handles. This is makes draw.io much more like alternative javascript node libraries, that allow editable arrow targets. This is useful for employing draw.io as a front-end for computational graph tasks. Additionally, this child-freeze behavoir is a better method for creating libraries of composite objects using draw.io itself rather than SVG imports.

The subnodes on the right have had movable disabled. Which has the intended edit-ability, but not the correct behavior on resizing the parent. image