aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
authorhwc4872012-02-02 15:10:06 -0800
committerhwc4872012-02-02 15:10:06 -0800
commite02deaf0d1b1f7dbcf022442cb730490ac8cee8b (patch)
treed1a171a285f41c640b0ab0c8e830406ca6de113d /js/tools
parent4ebae7378608750192f8d3bb392a54222ca0ec2f (diff)
parentd41dee0c552a30724a146965ae4272a268777fc5 (diff)
downloadninja-e02deaf0d1b1f7dbcf022442cb730490ac8cee8b.tar.gz
Merge branch 'ToolFixes' of github.com:mqg734/ninja-internal into working
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 {