aboutsummaryrefslogtreecommitdiff
path: root/js/tools/SelectionTool.js
diff options
context:
space:
mode:
authorEric Guzman2012-02-29 16:13:19 -0800
committerEric Guzman2012-02-29 16:13:19 -0800
commit53bdb1e7773069c4cca59e88d6da91cd0f58c94a (patch)
tree44a2147fcbb43ea483f78a1e2e082919f9c81970 /js/tools/SelectionTool.js
parentb2c60efb9c6f5dfa7b0fc5c2b9feebebc805ed97 (diff)
parentb09956e4a9a35c5588cc7cd1f01efb617cbe0884 (diff)
downloadninja-53bdb1e7773069c4cca59e88d6da91cd0f58c94a.tar.gz
Merge branch 'refs/heads/master' into CSSPanelUpdates
Conflicts: js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js
Diffstat (limited to 'js/tools/SelectionTool.js')
-rwxr-xr-xjs/tools/SelectionTool.js19
1 files changed, 18 insertions, 1 deletions
diff --git a/js/tools/SelectionTool.js b/js/tools/SelectionTool.js
index 37029e8c..caa9e8d6 100755
--- a/js/tools/SelectionTool.js
+++ b/js/tools/SelectionTool.js
@@ -305,16 +305,33 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, {
305 newHeight.push(_h + "px"); 305 newHeight.push(_h + "px");
306 306
307 viewUtils.setMatrixForElement(elt, previousMat); 307 viewUtils.setMatrixForElement(elt, previousMat);
308
309 this._targets[i].mat = previousMat;
310 this._targets[i].matInv = glmat4.inverse(previousMat, []);
308 } 311 }
309 } 312 }
310 if(addToUndoStack) 313 if(addToUndoStack)
311 { 314 {
312 ElementsMediator.setProperties(this.application.ninja.selectedElements, 315 // if we have a delta, that means the transform handles were used and
316 // we should update the width and height too. Otherwise, just update left and top.
317 if(this._delta)
318 {
319 ElementsMediator.setProperties(this.application.ninja.selectedElements,
313 { "left": newLeft, "top": newTop, "width": newWidth, "height": newHeight }, 320 { "left": newLeft, "top": newTop, "width": newWidth, "height": newHeight },
314 "Change", 321 "Change",
315 "selectionTool", 322 "selectionTool",
316 { "left" : previousLeft, "top" : previousTop, "width": previousWidth, "height": previousHeight} 323 { "left" : previousLeft, "top" : previousTop, "width": previousWidth, "height": previousHeight}
317 ); 324 );
325 }
326 else
327 {
328 ElementsMediator.setProperties(this.application.ninja.selectedElements,
329 { "left": newLeft, "top": newTop },
330 "Change",
331 "selectionTool",
332 { "left" : previousLeft, "top" : previousTop }
333 );
334 }
318 } 335 }
319 // Save previous value for undo/redo 336 // Save previous value for undo/redo
320 this._undoArray = []; 337 this._undoArray = [];