Commit e1c4295a authored by Jérôme Chauveau's avatar Jérôme Chauveau
Browse files

debug next/previous button

parent 82eabd86
Loading
Loading
Loading
Loading
+2
Changes for ui/js/MaxTEI.js: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -122,9 +122,11 @@ class MaxTEI extends AbstractMax {
    bindNavigationTool() {
        //local function : find next or previous nav link
        let nextOrPrevious = function (step) {

            let current = document.getElementById("navigation-tool").querySelector('button').getAttribute("data-target").replace("selected-", "");//remove 'selected' prefix
            let newCurrent = current.replaceAll(".", "\\.")
            let links = document.getElementById('dropdown-navigation').querySelectorAll('li');

            let position = -1;
            links.forEach((link, index) => {
                if(link.dataset.target === newCurrent){