-
Hi, I have the following requirement:
Requesting the inputs for the implementation. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Hi, to place a label relative to an edge, you typically add a This label can be made editable as any other label with the configureModelElement(context, 'label:type', SLabel, SLabelView, { enable: [editLabelFeature] }); and an 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 are two general approaches:
Both should be possible, but isn't straightforward. I think I'd go with approach 1, as it would interfere less with default behavior and you'd have everything under your control. |
Beta Was this translation helpful? Give feedback.
Hi,
to place a label relative to an edge, you typically add a
GLabel
as a child of anGEdge
and control its automatic positioning with theedgePlacement
property in theGLabel
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 thedi.config.ts
:and an
OperationHandler
for theApplyLabelEditOperation
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…