GLSP vscode client: How to diasable layout editing #397
-
I am using GLSP's vscode client(https://github.com/eclipse-glsp/glsp-vscode-integration), Currently we can drag and drop edges and nodes. But I want to disable this layout editing. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, |
Beta Was this translation helpful? Give feedback.
Hi,
you can customize this behavior using the Typehints API. This allows you to define on the server side whether elements of a certain type should be
deleteable
,repositonable
,resizeable
etc.For you usecase you should deactive the
repositonable
flag for all element types.The type hints are configured in the
DiagramConfiguration
class : https://github.com/eclipse-glsp/glsp-server/blob/c1f7b8d0af052a5ac3ba2adc4590355519509255/examples/org.eclipse.glsp.example.workflow/src/org/eclipse/glsp/example/workflow/WorkflowDiagramConfiguration.java#L70