Skip to content
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

disable pan and button click not working #16

Open
peratik opened this issue Nov 21, 2017 · 9 comments
Open

disable pan and button click not working #16

peratik opened this issue Nov 21, 2017 · 9 comments

Comments

@peratik
Copy link

peratik commented Nov 21, 2017

Hello

  1. I want only zoom, i disabled pan and rotate both but still pan is working.

  2. I used on a div, there are some buttons on div, button click not working.

var elem = document.getElementById('crossword'); var zm = new Zoom(elem, { pan: false, rotate: false });

Please advice.
Thank you

@anitasv
Copy link
Owner

anitasv commented Nov 21, 2017

For 2, it may not be easy to fix, there is a preventDefault in action: https://github.com/anitasv/zoom/blob/master/zoom.js#L316

You can try removing it and see how it works for you. This was done to avoid other effects like whole page zooming.

@anitasv
Copy link
Owner

anitasv commented Nov 21, 2017

For 1: Check if this demo is working on your device: http://anitasv.github.io/zoom/zoom_2.html

@peratik
Copy link
Author

peratik commented Nov 21, 2017

  1. I checked, pan still woring on my device: Samsung j7 Pro

  2. Thank you, problem is fixed by removing preventDefault .

@peratik
Copy link
Author

peratik commented Nov 21, 2017

  1. Pan working on zoom. I want to disable pan on zoom.

@anitasv
Copy link
Owner

anitasv commented Nov 21, 2017

Can you try 1.0.6 version, perhaps regression in the recent changes.

@anitasv
Copy link
Owner

anitasv commented Nov 21, 2017

Oh that way; pan:false use to remove only single button panning. I can see this can be added.

@peratik
Copy link
Author

peratik commented Nov 21, 2017

Please kindly send me ver 1.0.6

@anitasv
Copy link
Owner

anitasv commented Nov 24, 2017

That may not work, try setting t = 0
https://github.com/anitasv/zoom/blob/master/zoom.js#L180

@anitasv
Copy link
Owner

anitasv commented Nov 24, 2017

You may want option to fix origin of transformation also. Like zoom from mid point or zoom from top etc.
Otherwise multiple zoom events can do same effect as paning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants