anvaka / panzoom

Universal pan and zoom library (DOM, SVG, Custom)

Home Page:https://anvaka.github.io/panzoom/demo/attach-via-script.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

click event bubbles down on panend

AskAlice opened this issue · comments

When I'm finished dragging, if my mouse is over an element with a click event listener, the event listener is fired. I would like it to only fire if I'm not actually dragging.

How an I do this?

I tried

    this.panzoom.on('panend', (e) => {
      e.stopPropagation();
    });

but this is actually the opposite of what is needed, as it still bubbles down and also no longer ends panning.

I'd like to avoid forking this lib if possible