Skip to content

Commit

Permalink
Better mouse support when lockScalingFlip is true. (#4225)
Browse files Browse the repository at this point in the history
  • Loading branch information
ncou authored and asturur committed Aug 18, 2017
1 parent e9a5d00 commit b663204
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/canvas.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -841,14 +841,16 @@

if (lockScalingFlip && scaleX <= 0 && scaleX < target.scaleX) {
forbidScalingX = true;
localMouse.x = 0;
}

if (lockScalingFlip && scaleY <= 0 && scaleY < target.scaleY) {
forbidScalingY = true;
localMouse.y = 0;
}

if (by === 'equally' && !lockScalingX && !lockScalingY) {
forbidScalingX || forbidScalingY || (scaled = this._scaleObjectEqually(localMouse, target, transform, _dim));
scaled = this._scaleObjectEqually(localMouse, target, transform, _dim);
}
else if (!by) {
forbidScalingX || lockScalingX || (target.set('scaleX', scaleX) && (scaled = scaled || changeX));
Expand Down

0 comments on commit b663204

Please sign in to comment.