Skip to content

Commit

Permalink
Merge 4ebe0f9 into 69b0af5
Browse files Browse the repository at this point in the history
  • Loading branch information
nickknissen committed Jul 3, 2015
2 parents 69b0af5 + 4ebe0f9 commit 617a4f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ textAngular.directive("textAngular", [
y: Math.max(0, startPosition.height + (event.clientY - startPosition.y))
};

if(event.shiftKey){
// keep ratio
var keepRatio = (attrs.taImageResizeKeepAspectRatio !== undefined);
if(keepRatio || event.shiftKey) {
var newRatio = pos.y / pos.x;
pos.x = ratio > newRatio ? pos.x : pos.y / ratio;
pos.y = ratio > newRatio ? pos.x * ratio : pos.y;
Expand Down

0 comments on commit 617a4f4

Please sign in to comment.