From 4c3aac5eabd93052b1554a03d78235215bb49db4 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 29 May 2012 00:34:40 -0700 Subject: document bindings phase 1 - using array controller to bind the current document to all ninja components - removed open document event - removed references to the document controller Signed-off-by: Valerio Virgillito --- js/tools/PanTool.js | 1 - 1 file changed, 1 deletion(-) (limited to 'js/tools') 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, value: function () { var uc = this.application.ninja.currentDocument.model.documentRoot; - //var uc = documentManagerModule.DocumentManager.activeDocument var ucMat = viewUtils.getMatrixFromElement(uc); var noTrans = ucMat.slice(); -- cgit v1.2.3 From dd8a94c4ef0ccf19c332dd0a0c56fb8249aea63b Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Wed, 30 May 2012 13:13:01 -0700 Subject: Fixed bad reference to stage element in pen tool. Signed-off-by: Nivesh Rajbhandari --- js/tools/PenTool.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/tools') diff --git a/js/tools/PenTool.js b/js/tools/PenTool.js index 10eb03c9..3813123a 100755 --- a/js/tools/PenTool.js +++ b/js/tools/PenTool.js @@ -428,7 +428,7 @@ exports.PenTool = Montage.create(ShapeTool, { var globalMousePos=null, localMousePos=null, stageWorldMousePos = null; var drawingCanvas = this._selectedSubpath.getCanvas(); if (!drawingCanvas){ - drawingCanvas = ViewUtils.getStageElement(); + drawingCanvas = this.application.ninja.currentDocument.model.documentRoot; stageWorldMousePos = hitRec.calculateStageWorldPoint(); stageWorldMousePos[0]+= snapManager.getStageWidth()*0.5; stageWorldMousePos[1]+= snapManager.getStageHeight()*0.5; -- cgit v1.2.3 From 4dde49e0376e2cb64140f5baa85f5cadae0c9e16 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Fri, 1 Jun 2012 14:59:04 -0700 Subject: IKNinja-1609 - Stage rotates too fast when closing and re-opening file or switching between files. Signed-off-by: Nivesh Rajbhandari --- js/tools/RotateStage3DTool.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'js/tools') 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, { } }, + captureSelectionChange: { + value: function(event){ + this.eventManager.addEventListener("selectionDrawn", this, true); + } + }, + captureSelectionDrawn: { value: function(event){ this._origin = null; @@ -114,6 +120,11 @@ exports.RotateStage3DTool = Montage.create(Rotate3DToolBase, { this._origin = viewUtils.localToGlobal(eltCtr, stage); this._setTransformOrigin(false); this.DrawHandles(); + + if(event) + { + this.eventManager.removeEventListener("selectionDrawn", this, true); + } } }, -- cgit v1.2.3 From 6db48c84047466baadfb6132cba9dbc6e0d3799c Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Fri, 1 Jun 2012 16:09:51 -0700 Subject: IKNinja-1610 and IKNinja-1647 - Can't use transform tool if you haven't used a drawing tool yet. Signed-off-by: Nivesh Rajbhandari --- js/tools/drawing-tool-base.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/tools') 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, { // return null; // } if(downHitRec) { - hitRec = hitRec.convertToWorkingPlane(this.dragPlane); + hitRec = hitRec.convertToWorkingPlane(this.dragPlane || downHitRec.getPlane()); } else if ((hitRec.getType() !== hitRec.SNAP_TYPE_STAGE) && !hitRec.isSomeGridTypeSnap()) { hitRec = hitRec.convertToWorkingPlane( snapManager.getDragPlane() ); } -- cgit v1.2.3