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

Image Viewer Needs Touch Support #35

Closed
miqrogroove opened this issue Jun 2, 2022 · 9 comments
Closed

Image Viewer Needs Touch Support #35

miqrogroove opened this issue Jun 2, 2022 · 9 comments

Comments

@miqrogroove
Copy link
Contributor

Is there an updated version of the included image viewer? It works great with a mouse and keyboard, but on my touch screen I can't pan or pinch zoom at all.

@collectiveaccess
Copy link
Owner

That's the current version.

@miqrogroove
Copy link
Contributor Author

miqrogroove commented Jun 3, 2022

Part of the problem is the Image Overview feature is broken. It doesn't work right with a mouse or touch screen in any browser I've tried. This leaves mouse panning as the only means of navigation. If the tile viewer isn't going to get updates then I hope that part can be replaced with something newer.

I see the NGA site is using Mirador for its "Archival" category. Touch works with that one, for example. However, it doesn't seem to have a default implementation here. Using viewer = Mirador doesn't work out of the box.

@collectiveaccess
Copy link
Owner

Really? How exactly is it broken? It does what it's supposed to via mouse clicks in Chrome/Safari/Firefox.

@miqrogroove
Copy link
Contributor Author

miqrogroove commented Jun 3, 2022

To be fair, the Image Overview works at some zoom levels and not others. For example, go here and zoom in about 25%

https://kress.nga.gov/Detail/objects/3483

When full out or full in it does work. But with the slider about 25% to 33% from the left, that overview thing is not working the same way. It will show the rectangle in the correct spot, but it won't pan to the correct position where I click.

@collectiveaccess
Copy link
Owner

Oh I see the issue now. Thanks for finding this. We're not scaling coordinates when we pan, which doesn't make much of a difference at closer magnifications, but blows up when pulled out a bit.

@miqrogroove
Copy link
Contributor Author

I copied this file to my server and refreshed in Chrome https://raw.githubusercontent.com/collectiveaccess/pawtucket2/develop/assets/jquery/jquery-tileviewer/jquery.tileviewer.js

Seems to be much better, however around 50% zoom I'm unable to pan to the bottom or right edges. Should I open a new issue?

@miqrogroove
Copy link
Contributor Author

Nevermind, I found the correct math for this. I will open a new PR for you.

@miqrogroove
Copy link
Contributor Author

See #39

@miqrogroove
Copy link
Contributor Author

All of the above problems still exist in v1.7.16. See #46 for the scrolling patch to master.

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