Overlapping ranges make some titles in de index tab not "clickable"
nicolasfranck opened this issue Β· comments
UV version:
universalviewer@4.0.25
I'm submitting a:
- bug report => please fork one of these codesandbox examples with a repro of your issue and include a link to it below
Current behavior:
When I provide a manifest with overlapping ranges (two ranges have one or more of the same canvases),
one of the titles do not react "properly", i.e. when clicked the title does not become
blue and the first canvas is not triggered.
P.S. When navigating through the image list, the right range titles are selected, so that part
works perfectly.
Expected behavior:
Overlapping ranges should work
P.S. it works in https://universalviewer.io/examples/?manifest=http%3A%2F%2Fwellcomelibrary.org%2Fiiif%2Fb19974760-0%2Fmanifest&locale=en-GB#?c=&m=&s=&cv=3&manifest=https%3A%2F%2Fadore.ugent.be%2FIIIF%2Fmanifests%2Frange-test&xywh=0%2C-1599%2C10937%2C10415 which is probably based on an older version
Steps to reproduce:
- Use manifest https://adore.ugent.be/IIIF/manifests/range-test in the latest UV. Example: https://www.universalviewer.dev/#?xywh=-396%2C-1%2C11729%2C7219&iiifManifestId=https%3A%2F%2Fadore.ugent.be%2FIIIF%2Fmanifests%2Frange-test&cv=4&rid=https%3A%2F%2Fadore.ugent.be%2FIIIF%2Fmanifests%2Frange-test%2Franges%2Frange-test%253AR.4
- go tab "index"
- click on title "range 4". Nothing happens. The first canvas of that range is the last canvas of the previous range.
I made it work as follows:
- replace
this.selectCurrentTreeNode();
bythis.selectCurrentTreeNodeByCanvas();
on https://github.com/UniversalViewer/universalviewer/blob/main/src/content-handlers/iiif/modules/uv-contentleftpanel-module/ContentLeftPanel.ts#L105 - replace
this.selectCurrentTreeNode();
bythis.selectCurrentTreeNodeByRange();
on https://github.com/UniversalViewer/universalviewer/blob/main/src/content-handlers/iiif/modules/uv-contentleftpanel-module/ContentLeftPanel.ts#L114
I noticed that the method selectCurrentTreeNode
tries to determine the right method to call (selectCurrentTreeNodeByCanvas
or selectCurrentTreeNodeByRange
) based on the used
extension. But for the openseadragon extension it always selects selectCurrentTreeNodeByCanvas
If alright I'll prepare a PR