aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools')
-rw-r--r--js/tools/PanTool.js2
-rw-r--r--js/tools/ZoomTool.js8
2 files changed, 5 insertions, 5 deletions
diff --git a/js/tools/PanTool.js b/js/tools/PanTool.js
index 55a03674..71301d46 100644
--- a/js/tools/PanTool.js
+++ b/js/tools/PanTool.js
@@ -80,7 +80,6 @@ exports.PanTool = Montage.create(toolBase,
80 if(event.altKey) 80 if(event.altKey)
81 { 81 {
82 this._altKeyDown = true; 82 this._altKeyDown = true;
83 //console.log( "altKeyDown" );
84 } 83 }
85 } 84 }
86 }, 85 },
@@ -90,7 +89,6 @@ exports.PanTool = Montage.create(toolBase,
90 if(event.keyCode === Keyboard.ALT) 89 if(event.keyCode === Keyboard.ALT)
91 { 90 {
92 this._altKeyDown = false; 91 this._altKeyDown = false;
93 console.log( "altKeyUp" );
94 } 92 }
95 } 93 }
96 }, 94 },
diff --git a/js/tools/ZoomTool.js b/js/tools/ZoomTool.js
index 73297d16..4b6705c1 100644
--- a/js/tools/ZoomTool.js
+++ b/js/tools/ZoomTool.js
@@ -140,9 +140,11 @@ exports.ZoomTool = Montage.create(DrawingTool, {
140 { 140 {
141 value : function (event) 141 value : function (event)
142 { 142 {
143 // check for some reasonable amount of mouse movement 143 var point = webkitConvertPointFromPageToNode(this.application.ninja.stage.canvas,
144 var dx = Math.abs(event.layerX - this.downPoint.x), 144 new WebKitPoint(event.pageX, event.pageY));
145 dy = Math.abs(event.layerY - this.downPoint.y); 145 // check for some reasonable amount of mouse movement
146 var dx = Math.abs(point.x - this.downPoint.x),
147 dy = Math.abs(point.y - this.downPoint.y);
146 148
147 if ((dx >= 4) || (dy >= 4)) 149 if ((dx >= 4) || (dy >= 4))
148 { 150 {