Automatic vs Manual Layouting #1414
-
Hey there, I'm currently trying to implement layouting in my diagram. When I trigger the layout manually, elk returns the changes but they don't get applied. When I have the layout on automatic, it does actually apply the changes. I assumed that if automatic worked then manual would too, am I missing something? Using GLSP 2.2.1 server-node and vscode-integration. Kind Regards |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @jmenzies12, unfortunatley this is a known issue when using manual layout (#1173). Until this is fixed you could rebind the default |
Beta Was this translation helpful? Give feedback.
Hi @jmenzies12,
unfortunatley this is a known issue when using manual layout (#1173).
The implementation of the
LayoutOperationHandler
is faulty and does not work generically for custom source models.Currently the
ELkLayoutEngine
directly manipulates the graphical model (GModel). This works fine for the automatic layout use casebut does not work for the manual use case.
When automatic layout is used the layout information does not need to be persisted in the source model because it will be recalculated after every model update anyways. For manual layouting this is not true and the layout changes (size and position of elements) needs to be stored in the source model. This step is current…