aboutsummaryrefslogtreecommitdiff
path: root/js/tools/Translate3DToolBase.js
diff options
context:
space:
mode:
authorhwc4872012-04-13 11:52:13 -0700
committerhwc4872012-04-13 11:52:13 -0700
commit4f2fb5764703cab4ce3ada719b1395ed1e2f3b7c (patch)
tree3dc2e3c5a041179eed38eab1a00f851554e50005 /js/tools/Translate3DToolBase.js
parent521df0ed9242efff45715998837068c87aca7efd (diff)
parent4b900ea5cd6bb77eb30cec8c03b9ec9fa662c1e9 (diff)
downloadninja-4f2fb5764703cab4ce3ada719b1395ed1e2f3b7c.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Snapping_II
Conflicts: js/helper-classes/3D/view-utils.js js/panels/presets/animations-presets.reel/animations-presets.js js/panels/presets/style-presets.reel/style-presets.js js/panels/presets/transitions-presets.reel/transitions-presets.js js/tools/Translate3DToolBase.js
Diffstat (limited to 'js/tools/Translate3DToolBase.js')
-rwxr-xr-xjs/tools/Translate3DToolBase.js21
1 files changed, 13 insertions, 8 deletions
diff --git a/js/tools/Translate3DToolBase.js b/js/tools/Translate3DToolBase.js
index 2276178c..ac98d018 100755
--- a/js/tools/Translate3DToolBase.js
+++ b/js/tools/Translate3DToolBase.js
@@ -90,22 +90,21 @@ exports.Translate3DToolBase = Montage.create(ModifierToolBase,
90 value : function() 90 value : function()
91 { 91 {
92 var item, 92 var item,
93 elt,
94 mat, 93 mat,
95 dist, 94 dist,
96 newStyles = [], 95 newStyles = [],
97 previousStyles = [], 96 previousStyles = [],
98 len = this._targets.length; 97 len = this.application.ninja.selectedElements.length;
99 for(var i = 0; i < len; i++) 98 for(var i = 0; i < len; i++)
100 { 99 {
101 // Reset to the identity matrix but retain the rotation values 100 // Reset to the identity matrix but retain the rotation values
102 item = this._targets[i]; 101 item = this.application.ninja.selectedElements[i];
103 mat = item.mat.slice(0); 102 mat = ElementsMediator.getMatrix(item);
104 mat[12] = 0; 103 mat[12] = 0;
105 mat[13] = 0; 104 mat[13] = 0;
106 mat[14] = 0; 105 mat[14] = 0;
107 106
108 dist = this._undoArray[i].dist; 107 dist = ElementsMediator.getPerspectiveDist(item);
109 108
110 var previousStyleStr = {dist:dist, mat:item.mat}; 109 var previousStyleStr = {dist:dist, mat:item.mat};
111 110
@@ -125,8 +124,11 @@ exports.Translate3DToolBase = Montage.create(ModifierToolBase,
125 this.isDrawing = false; 124 this.isDrawing = false;
126 this.endDraw(event); 125 this.endDraw(event);
127 126
128// this.UpdateSelection(true); 127
129 this.Configure(true); 128 // Need to force stage to draw immediately so the new selection center is calculated
129 this.application.ninja.stage.draw();
130 // And captureSelectionDrawn to draw the transform handles
131 this.captureSelectionDrawn(null);
130 } 132 }
131 }, 133 },
132 134
@@ -201,8 +203,11 @@ exports.Translate3DToolBase = Montage.create(ModifierToolBase,
201 }, 203 },
202 204
203 _updateTargets: { 205 _updateTargets: {
204 value: function(addToUndoStack) 206 value: function(addToUndoStack) {
207 {
205 { 208 {
209// console.log( "_updateTargets" );
210 console.log( "_updateTargets" );
206 //console.log( "_updateTargets" ); 211 //console.log( "_updateTargets" );
207 var newStyles = [], 212 var newStyles = [],
208 previousStyles = [], 213 previousStyles = [],