-
Notifications
You must be signed in to change notification settings - Fork 295
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
Stop from scaling on initialization #93
Comments
https://github.com/manuelstofer/pinchzoom/blob/master/src/pinch-zoom.js#L89 |
It works for me. But you might need to change a little bit of code from the in pinch-zoom.js:87 var PinchZoom = function PinchZoom(el, options) {
// ...
this.options = Object.assign({}, this.defaults, options);
// Add this line of code below
// Which makes default zoomFactor been available to be change by options
this.zoomFactor = this.options.zoomFactor ? this.options.zoomFactor : 1;
// ...
}) in your JavaScript file: new PinchZoom.default(el, {
// Pass initialize scale rate
zoomFactor: 5
// Add any other options you need
// ...
}) |
InYourHead
pushed a commit
to InYourHead/pinchzoom
that referenced
this issue
Apr 17, 2023
InYourHead
added a commit
to InYourHead/pinchzoom
that referenced
this issue
Apr 17, 2023
InYourHead
added a commit
to InYourHead/pinchzoom
that referenced
this issue
Apr 17, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello.
Is there an option to prevent scaling on initialization?
Or if not, where to look to see scale on init code.
Thank you.
The text was updated successfully, but these errors were encountered: