Skip to content
Discussion options

You must be logged in to vote

Hi,

to place a label relative to an edge, you typically add a GLabel as a child of an GEdge and control its automatic positioning with the edgePlacement property in the GLabel of the edge. This is documented in the GLSP Client-side Layouting section.

This label can be made editable as any other label with the editLabelFeature in the di.config.ts:

configureModelElement(context, 'label:type', SLabel, SLabelView, { enable: [editLabelFeature] });

and an OperationHandler for the ApplyLabelEditOperation on the server to process label edits.

If you want to make this label movable, then you have to customize several places and store its user-defined position relative to the edge. I guess there ar…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@planger
Comment options

@Abhay0294
Comment options

@Abhay0294
Comment options

@planger
Comment options

@Abhay0294
Comment options

Answer selected by Abhay0294
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants