From b6fa38e2680ccce73f4a195f9adffa552f1d237c Mon Sep 17 00:00:00 2001 From: hwc487 Date: Wed, 4 Apr 2012 12:37:43 -0700 Subject: turned off translation handles during a multi-object drag. --- js/tools/modifier-tool-base.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'js/tools/modifier-tool-base.js') diff --git a/js/tools/modifier-tool-base.js b/js/tools/modifier-tool-base.js index 07b28747..e684f58a 100755 --- a/js/tools/modifier-tool-base.js +++ b/js/tools/modifier-tool-base.js @@ -852,8 +852,10 @@ exports.ModifierToolBase = Montage.create(DrawingTool, { } } - this.DrawHandles(this._delta); - if(this._canSnap) + if (!this._isDrawing || (this.application.ninja.selectedElements.length == 1)) + this.DrawHandles(this._delta); + + if(this._canSnap) { snapManager.drawLastHit(); } @@ -892,6 +894,13 @@ exports.ModifierToolBase = Montage.create(DrawingTool, { this._delta = null; } this.endDraw(event); + + this.application.ninja.stage.draw(); + if (this._targets && (this._targets.length > 1)) + { + this._origin = null; + this._updateHandlesOrigin(); + } this.DrawHandles(); } }, -- cgit v1.2.3 From 16f62ca09cc428043e8fef8bdeea11a989e62bc0 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Wed, 4 Apr 2012 16:29:16 -0700 Subject: Cap fix for vecUtils. --- js/tools/modifier-tool-base.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/tools/modifier-tool-base.js') diff --git a/js/tools/modifier-tool-base.js b/js/tools/modifier-tool-base.js index e684f58a..b6589cba 100755 --- a/js/tools/modifier-tool-base.js +++ b/js/tools/modifier-tool-base.js @@ -177,7 +177,7 @@ exports.ModifierToolBase = Montage.create(DrawingTool, { } // only do quadrant snapping if the 4 corners of the element are in the drag plane - var sign = MathUtils.fpSign( VecUtils.vecDot(3,this._dragPlane,[0,0,1]) + this._dragPlane[3] - 1.0); + var sign = MathUtils.fpSign( vecUtils.vecDot(3,this._dragPlane,[0,0,1]) + this._dragPlane[3] - 1.0); this._shouldUseQuadPt = (sign == 0) var wpHitRec = hitRec.convertToWorkingPlane( this._dragPlane ); -- cgit v1.2.3 From 96bfeee2e6b735b87e8482d6e2cf24d5224c6417 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Thu, 5 Apr 2012 17:03:14 -0700 Subject: translate3DObject tool fixes. --- js/tools/modifier-tool-base.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'js/tools/modifier-tool-base.js') diff --git a/js/tools/modifier-tool-base.js b/js/tools/modifier-tool-base.js index 2c9b484e..f9fd001c 100755 --- a/js/tools/modifier-tool-base.js +++ b/js/tools/modifier-tool-base.js @@ -405,6 +405,7 @@ exports.ModifierToolBase = Montage.create(DrawingTool, { var index = this._snapIndex; var pt0; var useViewPoint = (this._inLocalMode && (this._targets.length === 1)); + //console.log( "useViewPoint: " + useViewPoint ); if (this._useQuadPt) { pt0 = this.GetQuadrantPoint(useViewPoint); @@ -427,6 +428,7 @@ exports.ModifierToolBase = Montage.create(DrawingTool, { pt1 = MathUtils.transformPoint( pt1, this._startMat ); } + //console.log( "getMousePoints, useViewPoint: " + useViewPoint + ", " + pt0 + " => " + pt1 ); return {pt0:pt0, pt1:pt1}; } else -- cgit v1.2.3 From f522ce09d98bbb2812ed25bb942597d854d71a1c Mon Sep 17 00:00:00 2001 From: hwc487 Date: Wed, 11 Apr 2012 16:01:33 -0700 Subject: Rotate3D tool changes --- js/tools/modifier-tool-base.js | 1 + 1 file changed, 1 insertion(+) (limited to 'js/tools/modifier-tool-base.js') diff --git a/js/tools/modifier-tool-base.js b/js/tools/modifier-tool-base.js index f9fd001c..2609ae9c 100755 --- a/js/tools/modifier-tool-base.js +++ b/js/tools/modifier-tool-base.js @@ -565,6 +565,7 @@ exports.ModifierToolBase = Montage.create(DrawingTool, { var pt = hitRec.getScreenPoint(); this.upPoint.x = pt[0]; this.upPoint.y = pt[1]; + this.upPoint.z = pt[2]; } } } -- cgit v1.2.3 From f91e64235eb03c889ff4f5577c3e3480cd0d787f Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 13 Apr 2012 00:30:19 -0700 Subject: removing _undo array and _targets array and use object instead of matching arrays to set properties Signed-off-by: Valerio Virgillito --- js/tools/modifier-tool-base.js | 35 ++++++----------------------------- 1 file changed, 6 insertions(+), 29 deletions(-) (limited to 'js/tools/modifier-tool-base.js') diff --git a/js/tools/modifier-tool-base.js b/js/tools/modifier-tool-base.js index de73c861..6de5d06c 100755 --- a/js/tools/modifier-tool-base.js +++ b/js/tools/modifier-tool-base.js @@ -125,8 +125,7 @@ exports.ModifierToolBase = Montage.create(DrawingTool, { // } // } - - if(this._targets) + if(this.application.ninja.selectedElements.length) { var point = webkitConvertPointFromPageToNode(this.application.ninja.stage.canvas, new WebKitPoint(event.pageX, event.pageY)); @@ -142,11 +141,10 @@ exports.ModifierToolBase = Montage.create(DrawingTool, { } // we don't want to snap to selected objects during the drag - var len = this._targets.length; - for(var i=0; i 1)) { - this._origin = null; + //this._origin = null; this._updateHandlesOrigin(); } this.DrawHandles(); } }, + _updateHandlesOrigin: { + value: function () { } + }, + handleToolDoubleClick: { value: function(event) { if(!this._target) -- cgit v1.2.3 From 5561e7cc43ae9f7cb9d1217ac02f9f136000e79c Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 13 Apr 2012 13:37:17 -0700 Subject: fixed stage rotation Signed-off-by: Valerio Virgillito --- js/tools/modifier-tool-base.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'js/tools/modifier-tool-base.js') diff --git a/js/tools/modifier-tool-base.js b/js/tools/modifier-tool-base.js index 6de5d06c..8cd21a29 100755 --- a/js/tools/modifier-tool-base.js +++ b/js/tools/modifier-tool-base.js @@ -809,7 +809,10 @@ exports.ModifierToolBase = Montage.create(DrawingTool, { if(!this._activateOriginHandle) { this.application.ninja.stage.drawNow = true; + var canSnap = this._canSnap; + this._canSnap = true; this.doSelection(event); + this._canSnap = canSnap; } } -- cgit v1.2.3