aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools')
-rwxr-xr-xjs/tools/PanTool.js1
-rwxr-xr-xjs/tools/RotateStage3DTool.js11
-rwxr-xr-xjs/tools/drawing-tool-base.js2
3 files changed, 12 insertions, 2 deletions
diff --git a/js/tools/PanTool.js b/js/tools/PanTool.js
index 39f89d17..a8911c0c 100755
--- a/js/tools/PanTool.js
+++ b/js/tools/PanTool.js
@@ -122,7 +122,6 @@ exports.PanTool = Montage.create(toolBase,
122 value: function () 122 value: function ()
123 { 123 {
124 var uc = this.application.ninja.currentDocument.model.documentRoot; 124 var uc = this.application.ninja.currentDocument.model.documentRoot;
125 //var uc = documentManagerModule.DocumentManager.activeDocument
126 var ucMat = viewUtils.getMatrixFromElement(uc); 125 var ucMat = viewUtils.getMatrixFromElement(uc);
127 126
128 var noTrans = ucMat.slice(); 127 var noTrans = ucMat.slice();
diff --git a/js/tools/RotateStage3DTool.js b/js/tools/RotateStage3DTool.js
index 12b21a64..9e117837 100755
--- a/js/tools/RotateStage3DTool.js
+++ b/js/tools/RotateStage3DTool.js
@@ -85,6 +85,12 @@ exports.RotateStage3DTool = Montage.create(Rotate3DToolBase, {
85 } 85 }
86 }, 86 },
87 87
88 captureSelectionChange: {
89 value: function(event){
90 this.eventManager.addEventListener("selectionDrawn", this, true);
91 }
92 },
93
88 captureSelectionDrawn: { 94 captureSelectionDrawn: {
89 value: function(event){ 95 value: function(event){
90 this._origin = null; 96 this._origin = null;
@@ -114,6 +120,11 @@ exports.RotateStage3DTool = Montage.create(Rotate3DToolBase, {
114 this._origin = viewUtils.localToGlobal(eltCtr, stage); 120 this._origin = viewUtils.localToGlobal(eltCtr, stage);
115 this._setTransformOrigin(false); 121 this._setTransformOrigin(false);
116 this.DrawHandles(); 122 this.DrawHandles();
123
124 if(event)
125 {
126 this.eventManager.removeEventListener("selectionDrawn", this, true);
127 }
117 } 128 }
118 }, 129 },
119 130
diff --git a/js/tools/drawing-tool-base.js b/js/tools/drawing-tool-base.js
index 3549de1c..a752ad65 100755
--- a/js/tools/drawing-tool-base.js
+++ b/js/tools/drawing-tool-base.js
@@ -86,7 +86,7 @@ exports.DrawingToolBase = Montage.create(Component, {
86// return null; 86// return null;
87// } 87// }
88 if(downHitRec) { 88 if(downHitRec) {
89 hitRec = hitRec.convertToWorkingPlane(this.dragPlane); 89 hitRec = hitRec.convertToWorkingPlane(this.dragPlane || downHitRec.getPlane());
90 } else if ((hitRec.getType() !== hitRec.SNAP_TYPE_STAGE) && !hitRec.isSomeGridTypeSnap()) { 90 } else if ((hitRec.getType() !== hitRec.SNAP_TYPE_STAGE) && !hitRec.isSomeGridTypeSnap()) {
91 hitRec = hitRec.convertToWorkingPlane( snapManager.getDragPlane() ); 91 hitRec = hitRec.convertToWorkingPlane( snapManager.getDragPlane() );
92 } 92 }