-
I am implementing a custom module to show extended properties for GLSP elements. How do I react on the selection of a GSLP Element from the diagram pane? I guess I have to implement some kind of action handler? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I found the solution by myself as this topic is perfectly documented - Implementing an Action Handler (GLSP Client) So in summary you have to implement a custom handler for the ElementSeleciton Action: @injectable()
export class MySelectResponseActionHandler implements IActionHandler{
handle(action: SelectAction): void | Action {
console.log('hi selection action !');
// implement your custom logic to handle the action
// Optionally issue a response action
}
} and register this action handler in the diagram module (“di.config.ts”): const bpmnDiagramModule = new ContainerModule((bind, unbind, isBound, rebind) => {
....
configureActionHandler(context, SelectAction.KIND, MySelectResponseActionHandler);
......
}); |
Beta Was this translation helpful? Give feedback.
I found the solution by myself as this topic is perfectly documented - Implementing an Action Handler (GLSP Client)
Also important was the reference to the existing Evens provided by the GLSP protocol decribing the ElementSelection
So in summary you have to implement a custom handler for the ElementSeleciton Action:
and register this action handler in the diagram module (“di.config.ts”):