GraphObject click interrupts double click

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();
            }
...)

You had also sent us email, where we responded with this sample that demonstrates receiving both click and doubleClick events: https://codepen.io/simonsarris/pen/EJzZBy?editors=1011

Basically, this (or something like it) should work for you:

  $(go.Node, "Auto",
    {
      click: function(e, node) { console.log("clicked " + node.data.key); },
      doubleClick: function(e, node) { console.log("doubleclicked " + node.data.key); },
    },
    . . .