svg-pan-zoom icon indicating copy to clipboard operation
svg-pan-zoom copied to clipboard

Panning stops when the mouse leaves the svg area

Open nmoreaud opened this issue 4 years ago • 3 comments

With the latest version, when the mouse leaves the SVG element, the movement is stopped. This is a weird user interaction.

There was already a ticket about this but it has been closed without action : https://github.com/ariutta/svg-pan-zoom/issues/327

nmoreaud avatar May 15 '20 13:05 nmoreaud

Is there any workaround this? This is really bad for user experience to stop panning when mouse moves out of SVG.

ehassaan avatar Mar 26 '22 00:03 ehassaan

Passing window or some container element to eventsListenerElement does the work.

ehassaan avatar Mar 26 '22 01:03 ehassaan

Running into the same problem. I tried the trick with passing window to eventsListenerElement.

However then the svg element reacts to clicks anywhere on the website.

christianbrugger avatar May 12 '24 09:05 christianbrugger