diff options
author | Valerio Virgillito | 2012-02-28 13:17:55 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-28 13:17:55 -0800 |
commit | e5b1102f0cff7f5ba7074840ccf29dc1c02ced8e (patch) | |
tree | 3228242a101b366b1282a0c96651db0e52760e34 /js | |
parent | 7c9291a5bab4abd849547f8878f6fb962fc88250 (diff) | |
parent | a70c62891d0c7dd032d9382c50d1555ab81c4e33 (diff) | |
download | ninja-e5b1102f0cff7f5ba7074840ccf29dc1c02ced8e.tar.gz |
Merge branch 'ToolFixes' of https://github.com/mqg734/ninja-internal into integration-candidate
Diffstat (limited to 'js')
-rwxr-xr-x | js/data/tools-data.js | 6 | ||||
-rwxr-xr-x | js/mediators/keyboard-mediator.js | 7 | ||||
-rwxr-xr-x | js/tools/Rotate3DToolBase.js | 11 | ||||
-rwxr-xr-x | js/tools/Translate3DToolBase.js | 1 |
4 files changed, 14 insertions, 11 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, { | |||
37 | "properties": "rotate3DProperties", | 37 | "properties": "rotate3DProperties", |
38 | "spriteSheet": true, | 38 | "spriteSheet": true, |
39 | "action": "Rotate3DTool", | 39 | "action": "Rotate3DTool", |
40 | "toolTip": "3D Rotate Object Tool (W)", | 40 | "toolTip": "3D Object Rotate Tool (W)", |
41 | "cursor": "auto", | 41 | "cursor": "auto", |
42 | "lastInGroup": false, | 42 | "lastInGroup": false, |
43 | "container": false, | 43 | "container": false, |
@@ -48,7 +48,7 @@ exports.ToolsData = Montage.create(Montage, { | |||
48 | "properties": "translate3DProperties", | 48 | "properties": "translate3DProperties", |
49 | "spriteSheet": true, | 49 | "spriteSheet": true, |
50 | "action": "Translate3DTool", | 50 | "action": "Translate3DTool", |
51 | "toolTip": "3D Translate Object Tool (G)", | 51 | "toolTip": "3D Object Translate Tool (G)", |
52 | "cursor": "auto", | 52 | "cursor": "auto", |
53 | "lastInGroup": true, | 53 | "lastInGroup": true, |
54 | "container": false, | 54 | "container": false, |
@@ -195,7 +195,7 @@ exports.ToolsData = Montage.create(Montage, { | |||
195 | "properties": "rotateStageProperties", | 195 | "properties": "rotateStageProperties", |
196 | "spriteSheet": true, | 196 | "spriteSheet": true, |
197 | "action": "RotateStageTool3D", | 197 | "action": "RotateStageTool3D", |
198 | "toolTip": "3D Rotate Stage Tool", | 198 | "toolTip": "3D Stage Rotate Tool (M)", |
199 | "cursor": "auto", | 199 | "cursor": "auto", |
200 | "lastInGroup": false, | 200 | "lastInGroup": false, |
201 | "container": false, | 201 | "container": false, |
diff --git a/js/mediators/keyboard-mediator.js b/js/mediators/keyboard-mediator.js index 443a18ac..43098cba 100755 --- a/js/mediators/keyboard-mediator.js +++ b/js/mediators/keyboard-mediator.js | |||
@@ -162,6 +162,13 @@ exports.KeyboardMediator = Montage.create(Component, { | |||
162 | return; | 162 | return; |
163 | } | 163 | } |
164 | 164 | ||
165 | // Rotate Stage Tool is M | ||
166 | if(evt.keyCode === Keyboard.M ) { | ||
167 | evt.preventDefault(); | ||
168 | this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[13]}); | ||
169 | return; | ||
170 | } | ||
171 | |||
165 | // Hand tool | 172 | // Hand tool |
166 | if(evt.keyCode === Keyboard.H ) { | 173 | if(evt.keyCode === Keyboard.H ) { |
167 | evt.preventDefault(); | 174 | evt.preventDefault(); |
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, { | |||
447 | iMat; | 447 | iMat; |
448 | for(var i = 0; i < len; i++) | 448 | for(var i = 0; i < len; i++) |
449 | { | 449 | { |
450 | // Reset to the identity matrix but retain the rotation values | 450 | // Reset to the identity matrix |
451 | item = this._targets[i]; | 451 | item = this._targets[i]; |
452 | elt = item.elt; | ||
453 | |||
454 | // Reset to the identity matrix but retain the translation values | ||
455 | iMat = Matrix.I(4); | 452 | iMat = Matrix.I(4); |
456 | mat = item.mat; | 453 | mat = item.mat; |
457 | iMat[12] = mat[12]; | 454 | // iMat[12] = mat[12]; |
458 | iMat[13] = mat[13]; | 455 | // iMat[13] = mat[13]; |
459 | iMat[14] = mat[14]; | 456 | // iMat[14] = mat[14]; |
460 | 457 | ||
461 | dist = this._undoArray[i].dist; | 458 | dist = this._undoArray[i].dist; |
462 | 459 | ||
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, | |||
85 | { | 85 | { |
86 | // Reset to the identity matrix but retain the rotation values | 86 | // Reset to the identity matrix but retain the rotation values |
87 | item = this._targets[i]; | 87 | item = this._targets[i]; |
88 | elt = item.elt; | ||
89 | mat = item.mat.slice(0); | 88 | mat = item.mat.slice(0); |
90 | mat[12] = 0; | 89 | mat[12] = 0; |
91 | mat[13] = 0; | 90 | mat[13] = 0; |