universalviewer icon indicating copy to clipboard operation
universalviewer copied to clipboard

Search footer last page label does not show.

Open andjsmit opened this issue 5 years ago • 1 comments

UV version:

 [email protected]

I'm submitting a:

  • [x] bug report
  • [ ] feature request => please use the user stories repo
  • [ ] support request => Please do not submit support requests here, use stackoverflow

Current behavior:

With pageModeEnabled: true, when the final page label in a manifest has a . (period) in it, the search footer label range does not display the page label but rather a - (dash).

Expected behavior:

The search range should end with the final page label.

Steps to reproduce:

Related code:

Sequence.prototype.getLastCanvasLabel = function (alphanumeric) {
            for (var i = this.getTotalCanvases() - 1; i >= 0; i--) {
                var canvas = this.getCanvasByIndex(i);
                var label = Manifesto.LanguageMap.getValue(canvas.getLabel(), this.options.locale);
                if (alphanumeric) {
                    var regExp = /^[a-zA-Z0-9]*$/;
                    if (regExp.test(label)) {
                        return label;
                    }
                }
                else if (label) {
                    return label;
                }
            }
            return this.options.defaultLabel;
        };

Other information:

Can additional non-alphanumeric characters be added to the regular expression?

andjsmit avatar Jan 06 '20 21:01 andjsmit

It's defaulting to alphanumeric here passing true to getLastCanvasLabel: https://github.com/UniversalViewer/universalviewer/blob/master/src/modules/uv-searchfooterpanel-module/FooterPanel.ts#L647 Perhaps we need to add this as a config option?

edsilv avatar Jan 07 '20 09:01 edsilv

All issues will be triaged for further investigation or closure by the 28 September 2023. If your issue is still relevant and would like for it be investigated further please comment by 14 September 2023.

LlGC-szw avatar Aug 25 '23 11:08 LlGC-szw