Merge pull request #27 from jaguarus83/patch-1

Fixed problem with cursor position in Firefox
master
Mark MacKay 2015-02-26 10:48:13 -06:00
commit 92bba1368b
1 changed files with 5 additions and 5 deletions

View File

@ -2369,11 +2369,11 @@ var getMouseTarget = this.getMouseTarget = function(evt) {
if (canvas.spaceKey) return;
var right_click = evt.button === 2;
root_sctm = svgcontent.getScreenCTM().inverse();
root_sctm = $('#svgcontent g')[0].getScreenCTM().inverse();
isBotchedZoom = svgedit.browser.isGecko();
var pt = transformPoint( evt.pageX, evt.pageY, root_sctm ),
mouse_x = pt.x * (isBotchedZoom ? 1 : current_zoom),
mouse_y = pt.y * (isBotchedZoom ? 1 : current_zoom);
mouse_x = pt.x * current_zoom,
mouse_y = pt.y * current_zoom;
evt.preventDefault();
@ -2729,8 +2729,8 @@ var getMouseTarget = this.getMouseTarget = function(evt) {
if(evt.button === 1 || canvas.spaceKey) return;
var selected = selectedElements[0],
pt = transformPoint( evt.pageX, evt.pageY, root_sctm ),
mouse_x = pt.x * (isBotchedZoom ? 1 : current_zoom),
mouse_y = pt.y * (isBotchedZoom ? 1 : current_zoom),
mouse_x = pt.x * current_zoom,
mouse_y = pt.y * current_zoom,
shape = getElem(getId());
var real_x = x = mouse_x / current_zoom;