aboutsummaryrefslogtreecommitdiff
path: root/js/tools/Rotate3DToolBase.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools/Rotate3DToolBase.js')
-rwxr-xr-xjs/tools/Rotate3DToolBase.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/js/tools/Rotate3DToolBase.js b/js/tools/Rotate3DToolBase.js
index 545aedad..bd735eea 100755
--- a/js/tools/Rotate3DToolBase.js
+++ b/js/tools/Rotate3DToolBase.js
@@ -245,6 +245,7 @@ exports.Rotate3DToolBase = Montage.create(ModifierToolBase, {
245 value: function(data, event) { 245 value: function(data, event) {
246 var mat, 246 var mat,
247 angle, 247 angle,
248 f,
248 pt0 = data.pt0, 249 pt0 = data.pt0,
249 pt1 = data.pt1; 250 pt1 = data.pt1;
250 251
@@ -291,7 +292,7 @@ exports.Rotate3DToolBase = Montage.create(ModifierToolBase, {
291 angle = this._getAngleToRotate(pt1.x, pt1.y); 292 angle = this._getAngleToRotate(pt1.x, pt1.y);
292 if(event.shiftKey) 293 if(event.shiftKey)
293 { 294 {
294 var f = Math.floor(angle/(Math.PI/4)); 295 f = Math.floor(angle/(Math.PI/4));
295 angle = f*Math.PI/4; 296 angle = f*Math.PI/4;
296 } 297 }
297 this._delta = angle; 298 this._delta = angle;
@@ -324,7 +325,7 @@ exports.Rotate3DToolBase = Montage.create(ModifierToolBase, {
324 } 325 }
325 if(event.shiftKey) 326 if(event.shiftKey)
326 { 327 {
327 var f = Math.floor(zAngle/(Math.PI/4)); 328 f = Math.floor(zAngle/(Math.PI/4));
328 zAngle = f*Math.PI/4; 329 zAngle = f*Math.PI/4;
329 } 330 }
330 mat = Matrix.RotationZ(zAngle); 331 mat = Matrix.RotationZ(zAngle);
@@ -335,7 +336,7 @@ exports.Rotate3DToolBase = Montage.create(ModifierToolBase, {
335 var xAngle = -this._mouseSpeed * (pt1.y - this.downPoint.y) * Math.PI / 180.0; 336 var xAngle = -this._mouseSpeed * (pt1.y - this.downPoint.y) * Math.PI / 180.0;
336 if(event.shiftKey) 337 if(event.shiftKey)
337 { 338 {
338 var f = Math.floor(yAngle/(Math.PI/4)); 339 f = Math.floor(yAngle/(Math.PI/4));
339 yAngle = f*Math.PI/4; 340 yAngle = f*Math.PI/4;
340 f = Math.floor(xAngle/(Math.PI/4)); 341 f = Math.floor(xAngle/(Math.PI/4));
341 xAngle = f*Math.PI/4; 342 xAngle = f*Math.PI/4;