Closed GoogleCodeExporter closed 9 years ago
Found a fix : in svgcanvas.js everywhere the mouse position is used, we must
not multiply by zoom level). Here is the code we used everywhere the mouse pos
is needed :
if(svgedit.browser.isGecko()){ // bug only occurs with FireFox
mouse_x = pt.x;
mouse_y = pt.y;
}
else{
mouse_x = pt.x * current_zoom ,
mouse_y = pt.y * current_zoom;
}
Original comment by micbu...@gmail.com
on 29 Jun 2012 at 9:56
Thanks for the update. I tried the fix and it seems to have fixed most of the
element drawings. However, I'm still having issues with the path edit/create.
On the initial node element that is created when drawing a polygon, the first
point shows up not positioned to where the mouse cursor was originally clicked.
However, once the polygon is connected, the position shifts to the right spot.
It's just the node that gets placed in the wrong position. I've tried the
code above and it doesn't seem to be working. I've attached screenshots of
before and after. Notice how the position of the first node is out of place
but once polygon is connected, it actually is in the right location.
Original comment by mxi...@acumium.com
on 3 Jul 2012 at 12:47
Attachments:
You need to apply the exception on mousemove too (around line 2730)
Since mousemove happens on every cursor movement it would be expensive calling
the function every time, so it's better to keep it in a variable.
mouse_x = pt.x * (isBotchedZoom ? 1 : current_zoom),
mouse_y = pt.y * (isBotchedZoom ? 1 : current_zoom),
Original comment by duopi...@gmail.com
on 26 Jul 2012 at 2:59
Has anyone found a fix for this in the textedit branch?
Original comment by Michael....@gmail.com
on 12 Sep 2012 at 3:57
For me, it was sufficient to fix root_sctm variable:
root_sctm = svgcontent.getScreenCTM().inverse();
if (svgedit.browser.isGecko()) {
root_sctm.a /= current_zoom;
root_sctm.b /= current_zoom;
root_sctm.c /= current_zoom;
root_sctm.d /= current_zoom;
root_sctm.e /= current_zoom;
root_sctm.f /= current_zoom;
}
Original comment by psi...@gmail.com
on 10 Oct 2012 at 12:36
Above does not work for mozilla versions below 13. This is actually a bug with
mozilla version 13 and above.
https://bugzilla.mozilla.org/show_bug.cgi?id=762411
I fixed it by adding a condition to check for mozilla and its version on
wherever root_sctm is initialized (Not a elegant solution).
Original comment by prasanth...@gmail.com
on 5 Nov 2012 at 6:39
Fixed at Issue 1046
Original comment by aldoluis...@gmail.com
on 6 Feb 2013 at 5:22
Original issue reported on code.google.com by
micbu...@gmail.com
on 9 Jun 2012 at 6:32