jquery-svgpan icon indicating copy to clipboard operation
jquery-svgpan copied to clipboard

Jumping and glitches during panning on Opera and sometimes on Google Chrome

Open Rush opened this issue 13 years ago • 1 comments

I am embedding my SVG like this: <div id="#viewarea"><svg><g id="viewport"><svg id="mysvg"> .........</svg></g></svg></div> In Chrome it mostly works very smootly however sometimes, with hard to define circumstances the SVG may suddenly jump for a few miliseconds to a different position. I have observed the same behaviour in Opera, however there it happens all the time! I attach a screencast to show the problem (sorry, recordMyDesktop has speeded up the recording ...). http://rushbase.net/stuff/out-3.ogv

Please see this demo page as a basic example showing the problem: http://rushbase.net/~rush/demo/main.html Try to drag the whole thing by text for example. The same page also demonstrates zooming problem with Firefox where zooming in zooms to a different position.

Rush avatar Aug 30 '12 15:08 Rush

The text dragging problem looks to be addressed with Issue #7, but that has not been re-pulled (there were issues with the merge).

I have not made the change myself in part because of the problem you mentioned -- zooming in FF is problematic because its implementation of getBoundingClientRect() for SVGs is bugged (https://bugzilla.mozilla.org/show_bug.cgi?id=530985). The text fix for Chrome depends upon this method. I'm wary of going very far down the path of implementing browser-specific fixes myself. Have you been able to come up with a more elegant solution?

talos avatar Sep 02 '12 18:09 talos