Mouse event on overlays


#1

I put overlays with a image on top of a BPMN element.I would like to pick up the double click event of that overlay for that element. How can I do that? I found no example or API doc related.

Thanks very much

Gang


#2

An overlay is a DOM element. You can simply attach listeners to it.

var overlay = $('<div />');

overlay.click(function(event) {
  // I GOT CLICKED!
});


modeler.get('overlays').add('foo', {
  html: overlay
});