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

Zoom in where double-click takes place #22

Closed
Sedins opened this issue Apr 1, 2014 · 4 comments
Closed

Zoom in where double-click takes place #22

Sedins opened this issue Apr 1, 2014 · 4 comments

Comments

@Sedins
Copy link

Sedins commented Apr 1, 2014

Feature request:

I'm about to finalize a project and tested the site, which integrates cropbox, on 10+ people with different backgrounds and technical skills.

What hit me was that many of them got confused while zooming the image. Majority thought that it would be easier to grasp if the image zooms in where the double-click (or pinch-to-zoom on touchscreens) takes place.

Is a change like this something to be considered (default or as an optional parameter)?

@acornejo
Copy link
Owner

acornejo commented Apr 1, 2014

I am confused. Both double click to zoom and pinch zoom are already the default.

Check the demo. Please elaborate. Closing this issue for now.

@acornejo acornejo closed this as completed Apr 1, 2014
@Sedins
Copy link
Author

Sedins commented Apr 1, 2014

I'll try to clarify:

  1. Go here http://acornejo.github.io/jquery-cropbox/
  2. Double-click or pinch on touchscreen f.ex. the smaller shed (garage) to the left in the picture
  3. The plugin zooms in to the middle of the picture even if you double-clicked to the left

Most users was used to having the picture zooming in where they had double-clicked. I.e. the clicked location is centered in cropbox when zoom occurs.

Like zooming on Google Maps (and a lot of other maps). When double-clicking somewhere, they move the map to zoom in at the clicked location instead of "just" zooming in.
https://www.google.com/maps/place/New+York/@40.7044596,-74.2032232,12z/data=!4m2!3m1!1s0x89c24fa5d33f083b:0xc80b8f06e177fe62

Hope it clears up a bit. Is a bit hard to explain this in text. Could do a nifty screenshot again otherwise :P

@acornejo
Copy link
Owner

acornejo commented Apr 1, 2014

Got it. You want the zoom to be centered on the pinch or double click event.

That requires adding a new function that zooms centered on another point. Shouldn't be too hard, when I get some time I'll look into it. (If you want to take a stab at implementing it let me know and I will gladly include your modification in the library)

@Sedins
Copy link
Author

Sedins commented Apr 7, 2014

Exactly. Would be great if it is possible to include that into cropbox.

Would be fun to familiarized with the library, but I have extremely little time left at the moment after work, kids and helping a company getting up and running I'm afraid. Hope it'll work out anyway though.

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