diff options
author | Jose Antonio Marquez | 2012-02-29 15:15:51 -0800 |
---|---|---|
committer | Jose Antonio Marquez | 2012-02-29 15:15:51 -0800 |
commit | b0b4a1ee6792d98f06cbd8ecf5291e66db8a4eef (patch) | |
tree | 5978eb8742df65de0e0b98454bfc04c2b4cac6e7 /js/tools/SelectionTool.js | |
parent | 3a25881b3a463e4f695be2f663f141710ba1d1c1 (diff) | |
parent | b09956e4a9a35c5588cc7cd1f01efb617cbe0884 (diff) | |
download | ninja-b0b4a1ee6792d98f06cbd8ecf5291e66db8a4eef.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into Color
Conflicts:
js/controllers/elements/shapes-controller.js
Diffstat (limited to 'js/tools/SelectionTool.js')
-rwxr-xr-x | js/tools/SelectionTool.js | 19 |
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 = []; |