From ef38731ae2769dcb2247db599cdfe62d38e34b28 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 27 Feb 2012 15:39:16 -0800 Subject: Reset translation values as well when double-clicking to reset the rotation values. Signed-off-by: Nivesh Rajbhandari --- js/tools/Rotate3DToolBase.js | 11 ++++------- js/tools/Translate3DToolBase.js | 1 - 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/js/tools/Rotate3DToolBase.js b/js/tools/Rotate3DToolBase.js index aa91b2f4..b04e8b0a 100755 --- a/js/tools/Rotate3DToolBase.js +++ b/js/tools/Rotate3DToolBase.js @@ -447,16 +447,13 @@ exports.Rotate3DToolBase = Montage.create(ModifierToolBase, { iMat; for(var i = 0; i < len; i++) { - // Reset to the identity matrix but retain the rotation values + // Reset to the identity matrix item = this._targets[i]; - elt = item.elt; - - // Reset to the identity matrix but retain the translation values iMat = Matrix.I(4); mat = item.mat; - iMat[12] = mat[12]; - iMat[13] = mat[13]; - iMat[14] = mat[14]; +// iMat[12] = mat[12]; +// iMat[13] = mat[13]; +// iMat[14] = mat[14]; dist = this._undoArray[i].dist; diff --git a/js/tools/Translate3DToolBase.js b/js/tools/Translate3DToolBase.js index cbf76830..3d9191da 100755 --- a/js/tools/Translate3DToolBase.js +++ b/js/tools/Translate3DToolBase.js @@ -85,7 +85,6 @@ exports.Translate3DToolBase = Montage.create(ModifierToolBase, { // Reset to the identity matrix but retain the rotation values item = this._targets[i]; - elt = item.elt; mat = item.mat.slice(0); mat[12] = 0; mat[13] = 0; -- cgit v1.2.3 From a70c62891d0c7dd032d9382c50d1555ab81c4e33 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 27 Feb 2012 16:24:13 -0800 Subject: Fixing tooltips and keyboard shortcuts for 3d tools. IKNinja-1014 and IKNinja-1015. Signed-off-by: Nivesh Rajbhandari --- js/data/tools-data.js | 6 +++--- js/mediators/keyboard-mediator.js | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/js/data/tools-data.js b/js/data/tools-data.js index cf48757d..a3a30b57 100755 --- a/js/data/tools-data.js +++ b/js/data/tools-data.js @@ -37,7 +37,7 @@ exports.ToolsData = Montage.create(Montage, { "properties": "rotate3DProperties", "spriteSheet": true, "action": "Rotate3DTool", - "toolTip": "3D Rotate Object Tool (W)", + "toolTip": "3D Object Rotate Tool (W)", "cursor": "auto", "lastInGroup": false, "container": false, @@ -48,7 +48,7 @@ exports.ToolsData = Montage.create(Montage, { "properties": "translate3DProperties", "spriteSheet": true, "action": "Translate3DTool", - "toolTip": "3D Translate Object Tool (G)", + "toolTip": "3D Object Translate Tool (G)", "cursor": "auto", "lastInGroup": true, "container": false, @@ -195,7 +195,7 @@ exports.ToolsData = Montage.create(Montage, { "properties": "rotateStageProperties", "spriteSheet": true, "action": "RotateStageTool3D", - "toolTip": "3D Rotate Stage Tool", + "toolTip": "3D Stage Rotate Tool (M)", "cursor": "auto", "lastInGroup": false, "container": false, diff --git a/js/mediators/keyboard-mediator.js b/js/mediators/keyboard-mediator.js index 5b044f8a..a2589340 100755 --- a/js/mediators/keyboard-mediator.js +++ b/js/mediators/keyboard-mediator.js @@ -162,6 +162,13 @@ exports.KeyboardMediator = Montage.create(Component, { return; } + // Rotate Stage Tool is M + if(evt.keyCode === Keyboard.M ) { + evt.preventDefault(); + this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[13]}); + return; + } + // Hand tool if(evt.keyCode === Keyboard.H ) { evt.preventDefault(); -- cgit v1.2.3