diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index e0206000..c08c7fe2 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -2364,6 +2364,17 @@ var getMouseTarget = this.getMouseTarget = function(evt) { } root_sctm = svgcontent.getScreenCTM().inverse(); + + // Firefox issue 1046 + if(current_zoom != 1 && root_sctm.a == 1) + { + matrix_e = root_sctm.e / current_zoom - root_sctm.e; + matrix_f = root_sctm.f / current_zoom - root_sctm.f; + matrix_scale = 1/current_zoom; + root_sctm = svgcontent.getScreenCTM().inverse() + .translate(matrix_e, matrix_f) + .scale(matrix_scale); + } var pt = transformPoint( evt.pageX, evt.pageY, root_sctm ), mouse_x = pt.x * current_zoom,