You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Create a html document containing a SVG element (not positioned in the top
left corner!)
2. Try to zoom using the mousewheel
What is the expected output? What do you see instead?
The zoom should go "into" the cursor, like here:
http://www.cyberz.org/projects/SVGPan/tiger.svg Instead, when zooming in, the
image drifts away in one direction.
What version of the product are you using? On what operating system?
SVGPan library 1.2.2; Probably all browsers are affected.
The following seems to work, but needs jQuery and changes to SVGPan.js:
Change the function getEventPoint() to:
function getEventPoint(evt) {
var p = root.createSVGPoint();
var errorX = $("#mydiv").offset().left-$(window).scrollLeft();
var errorY = $("#mydiv").offset().top-$(window).scrollTop();
p.x = evt.clientX-errorX;
p.y = evt.clientY-errorY;
return p;
}
Whereas "mydiv" is the id of the div, containing the svg-tag.
Original issue reported on code.google.com by [email protected] on 27 Feb 2012 at 5:43
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 27 Feb 2012 at 5:43The text was updated successfully, but these errors were encountered: