Hello,
I’m having a problem that i saw before but i was not sure if it was problem in bpm,
var eventBus = bpmnViewer.get(‘eventBus’);
eventBus.on(‘element.click’, overlayElemento);
i’m using this to trigger the event onclick and it works but sometimes the function that i’m calling on the event onclick is called twice in one click.
my function just show or hide a overlay
ex:
function overlayElemento(e) { if (e.element.type == 'bpmn:Task') { showHideOverlay(e.element.id + 'data'); // id of my overlay } }
and showHideOverlay check if the elements exist and show or hide…
the problem is since this function is been called 2 times in one click … yes the overlay will never be showed cuz he show and than hide(in one click)
i’m not really sure why this happeneds. but is not always if I press f5 can work like i want but sometimes just dont work like i want.