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

3.4.2 preserveViewport: false - Error in Openseadragon when double-clicking on the thumbnail #4079

Open
mexthecat opened this issue Jan 16, 2025 · 1 comment

Comments

@mexthecat
Copy link

If you open a page in tag: 3.4.2 with preserveViewport: false and then click on the same page in the thumbnails, the page disappears and an error is displayed for OpenSeadragon.

I solved this in my installation with the following batch:

diff --git a/src/state/reducers/viewers.js b/src/state/reducers/viewers.js
index ec36e293..91be7783 100644
--- a/src/state/reducers/viewers.js
+++ b/src/state/reducers/viewers.js
@@ -30,9 +30,6 @@ export const viewersReducer = (state = {}, action) => {
     case ActionTypes.SET_WINDOW_VIEW_TYPE:
       return set([action.windowId], null, state);
     case ActionTypes.SET_CANVAS:
-      if (!action.preserveViewport) {
-        return set([action.windowId], null, state);
-      }
       return state;
     case ActionTypes.IMPORT_MIRADOR_STATE:
       return action.state.viewers || {};

Unfortunately, I don't understand what I deleted. I assume that this is an artefact. Because in the last version the preserveViewport function is used directly by OpenSeadragon. But maybe I'm wrong and the lines have a meaning.

@marlo-longley
Copy link
Member

@mexthecat thanks for reporting this. We will have to release this fix but please let me know if your issue is fixed on the 3.x branch.

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