why does vis.js selectNode event cause node to stick to mouse pointer?

29 Views Asked by At

Am learning vis.js and trying to fire a simple custom event when a network node is clicked using the code below. The undesired behaviour I see is that on selecting a node with single click, the node then follows the mouse pointer until another click, whereupon the node is 'released' from the mouse. Is there an option I should set to prevent this undesired behaviour?

      let ids = properties.nodes;
      console.log("clicked", JSON.stringify(ids));
      const selectEvent = new CustomEvent("node", {
        bubbles: true,
        detail: { ids: ids }
      });
      this.dispatchEvent(selectEvent);
    });```
0

There are 0 best solutions below