aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools')
-rwxr-xr-xjs/tools/SelectionTool.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/js/tools/SelectionTool.js b/js/tools/SelectionTool.js
index 83d52d52..caa9e8d6 100755
--- a/js/tools/SelectionTool.js
+++ b/js/tools/SelectionTool.js
@@ -312,12 +312,26 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, {
312 } 312 }
313 if(addToUndoStack) 313 if(addToUndoStack)
314 { 314 {
315 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,
316 { "left": newLeft, "top": newTop, "width": newWidth, "height": newHeight }, 320 { "left": newLeft, "top": newTop, "width": newWidth, "height": newHeight },
317 "Change", 321 "Change",
318 "selectionTool", 322 "selectionTool",
319 { "left" : previousLeft, "top" : previousTop, "width": previousWidth, "height": previousHeight} 323 { "left" : previousLeft, "top" : previousTop, "width": previousWidth, "height": previousHeight}
320 ); 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 }
321 } 335 }
322 // Save previous value for undo/redo 336 // Save previous value for undo/redo
323 this._undoArray = []; 337 this._undoArray = [];