-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pinch to zoom gesture is broken - due to Skew changes #2496
Comments
When you add parameter, do you have still calculation error? If you have time to spare: var constraintPosition = target.translateToOriginPoint(target.getCenterPoint(), t.originX, t.originY),
- dim = target._getNonTransformedDimensions();
+ dim = target._getTransformedDimensions();
- this._setObjectScale(new fabric.Point(t.scaleX * s * dim.x, t.scaleY * s * dim.y),
- t, lockScalingX, lockScalingY, null, target.get('lockScalingFlip'));
+ this._setObjectScale(new fabric.Point(dim.x * s, dim.y * s),
+ t, lockScalingX, lockScalingY, null, target.get('lockScalingFlip'), dim); and if you want to try it on a skewed object to see if it feels ok. |
ping @mobidev111 |
Actually I see @mobidev111 said that "Just adding the missing parameter unfortunately does not resolve the gesture issue" so we'll need to check more |
@asturur regarding touch devices: a) cheap hardware - the easiest way would be e.g. a cheap android tablet with current android version. b) simulate multi-touch - you can simulate touch devices in the Chrome browser. |
The pinch to zoom gesture is broken in current master.
Root cause: canvas_gestures.mixin.js has not been updated to changes introduced with the Skew changes
The Skew changes in #2482 introduced a new parameter "dim" to the _setObjectScale() method: cda0611#diff-9dc132ed9a0787568f773999ba577e2bR637
canvas_gestures.mixin.js has not been updated to reflect this change: https://github.com/kangax/fabric.js/blob/4a6001e3561de546c24b6f8cc4b61db990c43367/src/mixins/canvas_gestures.mixin.js#L140
The lacking parameter causes an exception during calculation.
Just adding the missing parameter unfortunately does not resolve the gesture issue - please investigate.
The text was updated successfully, but these errors were encountered: