How to remove Double click event to add label in the modeler

Hi,

i have this requirement to create a properties panel and show it using double click event, how i can remove the default double click event that exist in the modeler?

thanks!

Hi Richard,

As you can see here the default is to activate direct editing on double click:

What you can do is hooking into the event bus to define what should happen on double click instead, and prevent the default behavior:

eventBus.on('element.dblclick', 1500, function(event) {
  // do your stuff here

  // stop propagating the event to prevent the default behavior
  event.stopPropagation();
});

Note that this event listener has a higher priority (1500) than the default one. This is necessary to make sure your listener is reached first.

Hope that helps :slight_smile:

1 Like

@pedesen thanks for your help, it worked as expected :clap:

1 Like