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

Support for touch devices #6

Open
nam-co opened this issue Sep 28, 2019 · 6 comments
Open

Support for touch devices #6

nam-co opened this issue Sep 28, 2019 · 6 comments
Labels
enhancement New feature or request

Comments

@nam-co
Copy link

nam-co commented Sep 28, 2019

Hi, thanks for the great package, I was wondering if is possible to:

  1. disable in phones (touch devices)?

  2. or maybe a feature where you double click to zoom in (where you click), and double click to zoom out

Thanks for everything

@jkalbhenn
Copy link
Contributor

hi,

  1. would probably require some kind of device detection. ive seen detection solutions that wait for mousemovement then activate.
  2. yes, maybe some fitting gestures can be found. ideal would probably be emulating a typical mobile pinch-zoom. or maybe it is possible to detect touch+move, then it would be like with a mouse (bit more problematic perhaps at the edges if the finger is over the desired area). if not, the double click option would certainly work, since it is possible to detect where the tap happened and then position the zoom image at that point.

this is a good idea for extension. im not sure when exactly i will find time to look into it myself. i'll try to have a go at it in the upcoming weeks. if someone else wants to go ahead i can merge pull requests.

@nam-co
Copy link
Author

nam-co commented Sep 30, 2019

Hi, thanks for the response, yes probably the double tab to zoom in and zoom out , is the most logical one and easiest, I wish I could help you but my limits go to design and a little php

Can number one work with just window width?

Any way, thanks for the response and the package

Good luck

@jkalbhenn
Copy link
Contributor

Can number one work with just window width?

if you mean detecting the current width, then i guess yes. only, small browser windows on desktop will also have a small width and mobile devices have a wide range of resolutions.

@nam-co
Copy link
Author

nam-co commented Oct 1, 2019

Yes of course, but resizing a desktop window to mobile size, is probably someone testing the mobile version 😄 , but then there’s mobiles with a high resolution and a device detection using user agent is always slower and a lot more kB.

I will look around for a good commented function, maybe you can use it

@jkalbhenn
Copy link
Contributor

there is now basic touch support with zoom/unzoom on tap. there is a delay until the image is positioned and so far i have not found a way to prevent that.

@nam-co
Copy link
Author

nam-co commented Nov 28, 2019

Thanks jkalbhenn, Gongrats and Thanks! I used the demo on iPhone and it works, I see the delay, but is only the first time. maybe activate a fadeout to just smooth the change?

@jkalbhenn jkalbhenn added the enhancement New feature or request label Apr 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants