This is a library-specific question for ariutta/svg-pan-zoom.
I've got an SVG element with some <a>
tags. Via jQuery, I handle clicks on those elements: $('svg').on('click', 'a', function() { ... })
.
Now I added the library mentioned above for zooming and panning the SVG element. That works great, except every time i pan when the cursor is on an a
element, it fires the click listener.
How can I prevent the listener from firing when the mouseup resulted from a pan?