Move ContextPad next to mouse click for SequenceFlow shape

Hello all!

Like the title says, I want to move (re-position) the contextPad next to where the users clicks with the mouse, in case of the sequence Flow shape. For example in the image below: I click in the middle of the line, but the contextPad is shown a the end of the shape.

I’ve tried using the contextPad.open event or by trying to override the “djs-context-pad open” style but without any luck.
I’ve seen that internally diagram-js uses two functions, _getPosition and _updatePosition but they are not available externally … I could override them but it seems hackish and could backfire with future updates of the diagram library.

Is there an easier way to re-position the contextPad?

Thanks,
Saby

There’s no easy way to override the position of the context pad. You’d have to customize it and essentially create your own _getPosition.

Thanks for the answer.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.