aboutsummaryrefslogtreecommitdiff
path: root/js/tools/Translate3DToolBase.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools/Translate3DToolBase.js')
-rwxr-xr-xjs/tools/Translate3DToolBase.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/js/tools/Translate3DToolBase.js b/js/tools/Translate3DToolBase.js
index 948383a3..e4f1fb99 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