]> _ Git - fluidbook-html5.git/commitdiff
wait #5015 @0:10
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 12 Jan 2022 11:02:13 +0000 (12:02 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 12 Jan 2022 11:02:13 +0000 (12:02 +0100)
js/libs/fluidbook/fluidbook.tabs.js

index 8d8d358d04091825cc16d32fb55be98a024f35b3..1a190bb958308cab8ebcb41b9385845460138d46 100644 (file)
@@ -97,6 +97,7 @@ FluidbookTabs.prototype = {
         this.hideEdge = this.fluidbook.settings.tabsHideEdges;
         this.linkWidth = parseFloat(this.fluidbook.settings.tabsLinkWidth);
         this.priority = parseFloat(this.fluidbook.settings.tabsPriority) / 100;
+        this.disabledOnPages=this.fluidbook.settings.tabsDisabledOnPages;
 
         this.sections = this.fluidbook.settings.tabsSections.map(function (x) {
             return parseInt(x);
@@ -195,19 +196,23 @@ FluidbookTabs.prototype = {
     changePage: function (page) {
         var id = 'oo';
         var $this = this;
-        $.each(this.links, function (k, v) {
-            if (page >= v.page) {
-                try {
-                    if (v.last !== undefined && page >= v.last) {
-                        id = 'none';
-                    } else {
-                        id = v.id;
-                    }
-                } catch (e) {
+        if(this.disabledOnPages.indexOf(page)>=0){
+            id='none';
+        }else {
+            $.each(this.links, function (k, v) {
+                if (page >= v.page) {
+                    try {
+                        if (v.last !== undefined && page >= v.last) {
+                            id = 'none';
+                        } else {
+                            id = v.id;
+                        }
+                    } catch (e) {
 
+                    }
                 }
-            }
-        });
+            });
+        }
 
         if (id === 'none') {
             this.svg.find('[id^="o"].active').removeClass('active');