-
Notifications
You must be signed in to change notification settings - Fork 4
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
X and Y coordinates break in sequence mode? #2
Comments
Interesting. I haven't tried it with sequence mode, so it probably just doesn't support it yet. For one thing, you'd want to keep track of the "page" of the sequence in addition to the other information. I'm guessing what's happening is that the pan is being reset whenever you go to a new page, potentially including the very first page of the sequence mode. Probably the thing to do is watch for the page event and do some handling there. Would you be up for modifying the bookmark URL code to address this? BTW, if I'm correct about what's causing the issue, adding |
Thanks for your reply -- I'll take a stab at the code and submit a PR for review if I'm able to help. :) |
Awesome, thank you! |
Not sure if this was subsequently fixed but just wanted to mention it is working as expected for me in sequence mode. I also added functionality to track the page in sequence mode and maintain both zoom and pan when loading a page (without using Let me know if it's worth submitting a PR, though I can't guarantee it's the best code! |
Interesting... I don't think there were any changes! Interesting that it's working now. Does your new functionality have a switch that can turn it on and off? As long as it's optional, I'd love to add it in here! Pull requests are welcome, even if they aren't the best code ;) |
@iangilman I've created a PR (#5). I made the page tracking optional but as I don't know javascript very well it may not be the best approach. Anyhow the code is working for me when used with the zoom-openseadragon WordPress plugin and latest OSD release. |
@camdey looks solid to me! I just had a couple small refinements to suggest. Thank you for doing this! |
Hello,
I'm using this plugin in a Rails application and noticed that the zoom functionality is preserved but not the x and y coordinates in the URL when you navigate to a page where the OSD viewer is in sequence mode. In collection mode, everything functions as expected. I suspect there might be an issue with the way in which I'm implementing the viewer:
Here's the code:
https://github.com/upenn-libraries/bulwark/blob/feature/COLENDA-124-OSD_enhancements/app/assets/javascripts/colenda.js
https://github.com/upenn-libraries/bulwark/blob/feature/COLENDA-124-OSD_enhancements/app/views/catalog/_show_main_content.html.erb#L17-L19
Any guidance would be greatly appreciated!
The text was updated successfully, but these errors were encountered: