aboutsummaryrefslogtreecommitdiff
path: root/js/tools/SelectionTool.js
diff options
context:
space:
mode:
authorhwc4872012-02-29 15:26:29 -0800
committerhwc4872012-02-29 15:26:29 -0800
commitcf32843b1d64c631e6e7c808cc4f13ac316e1baf (patch)
tree24009d69864151a36ddcf19a617aa6161f15e211 /js/tools/SelectionTool.js
parent07c48708a99b94a220c043ad5951a331bbd4fc2d (diff)
parenta89e30ab834a48be32b6122e0c8ac1e0c3ed43e8 (diff)
downloadninja-cf32843b1d64c631e6e7c808cc4f13ac316e1baf.tar.gz
Merge branch 'ToolFixes' of github.com:mqg734/ninja-internal into integration
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 = [];