Update canvas_gestures.mixin.js

we need to use transformed dimensions to include effect of skew. but we need to divide by current scale and use just the initial scale plus the scaling factor of gesture.
This commit is contained in:
Andrea Bogazzi 2015-11-13 01:44:07 +01:00
parent 931ef7d58f
commit d16ef6b124

View file

@ -136,7 +136,7 @@
var constraintPosition = target.translateToOriginPoint(target.getCenterPoint(), t.originX, t.originY),
dim = target._getTransformedDimensions();
this._setObjectScale(new fabric.Point(dim.x * s, dim.y * s),
this._setObjectScale(new fabric.Point(t.scaleX * dim.x * s / target.scaleX, t.scaleY * dim.y * s / target.scaleY),
t, lockScalingX, lockScalingY, null, target.get('lockScalingFlip'), dim);
target.setPositionByOrigin(constraintPosition, t.originX, t.originY);