Hello everyone,
I want to be able to call different functions on click and on doubleClick.
My code is as following.
Thing is, click is always called and doubleClick is never fired.
Is there a way to manage this except implementing throttling on my side? (with Rx / setTimeout etc)
Thanks.
$(Panel, 'Spot', {
name: PlaybookDiagramConstants.CARD_NAME,
// events
click: (e: InputEvent, obj: GraphObject) => {
this.onNodeSingleClick(obj.part.findObject('RootNode') as Part);
},
doubleClick: (e: InputEvent, obj) => {
e.handled = true;
e.event.preventDefault();
e.event.stopPropagation();
const clickedNode = obj.part.findObject('RootNode');
this.diagram$.zoomToRect(clickedNode.actualBounds, Diagram.Uniform);
this.hideStepPopover();
}
...)