jarvisniu / vue-zoomer

Zoom the image or other thing with mouse or touch
MIT License
150 stars 38 forks source link

Allow single tap option #29

Closed dnkmdg closed 3 years ago

dnkmdg commented 3 years ago

Allow click by single tap as well. Renamed Tap-handler and added eventbinder for onSingleTap. Also added some cursors for different states.

jarvisniu commented 3 years ago

Thank you for your PR! But I am afraid I can't accept it.

Because I think very few users have the "Single Tap/Click to Zoom" convention. And almost all of the image viewers don't have this behavior.

In order to keep the code simple, we can't include all features.

But if you really want to apply this behavior to your application, you can build your special version (i.e. fork this repo and publish it to npm package like @dnkmdg/vue-zoomer).

dnkmdg commented 3 years ago

Sorry to hear that. Considering usage for simple images, I disagree. Looking at viewers in VSCode or Slack, they work like this, and it’s easy to change the default setting to false. But if you’re unwilling to merge I will of course publish it as stand-alone package.

jarvisniu commented 3 years ago

I tried the vscode image viewer, its behavior is:

It's also like Chrome/Edge browser. It's easier, but not full featured.

This library is intended to implement the default image viewer of Windows, Android, iOS.

If i support this behavior. It will bring confusion to the developers and bring complexity to the code.

Maybe starting from scrach and only implementing the bahavior of Chrome/VSCode is better.

I am so sorry again!

dnkmdg commented 3 years ago

No worries! Since the functionality I needed was very specific I decided to publish a separate package. It’s mostly your code, just tweaked and stripped of gallery functions! Great work with the package!

jarvisniu commented 3 years ago

Thanks and good, that's just what I mean!