aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
authorPushkar Joshi2012-06-04 10:37:29 -0700
committerPushkar Joshi2012-06-04 10:37:29 -0700
commitf1d75e5b29661abc4e173adc1f9de2e0cd91df83 (patch)
tree796931014054ad6b0647854183f632ffd72ed9ee /js/tools
parent06b609df1ff7833592faddbd8d7abb5b9f15a74d (diff)
parentc1ec69879028220b0c3f11ad6e24035bf527802c (diff)
downloadninja-f1d75e5b29661abc4e173adc1f9de2e0cd91df83.tar.gz
Merge branch 'master' into pentool
Conflicts: js/tools/PenTool.js
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 }