]> _ Git - fluidbook-html5.git/commitdiff
fix #2571 @0:10
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 1 Feb 2019 17:41:37 +0000 (18:41 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 1 Feb 2019 17:41:37 +0000 (18:41 +0100)
js/libs/fluidbook/fluidbook.nav.js

index fd635e302777ad822b1428c368e633854a71b84d..f0b1b80bef421bee73de02849d7a0991851dd99a 100644 (file)
@@ -20,6 +20,11 @@ FluidbookNav.prototype = {
             inverted = this.fluidbook.datas.invertMenuPosition,
             side = ((dir == 'ltr' && inverted) || (dir == 'rtl' && !inverted)) ? 'right' : 'left';
 
+        var extensions = ['pagedim-black', 'position-front'];
+        if (side == 'right') {
+            extensions.push('position-right');
+        }
+
         this.menu.mmenu({
 
             // Allow #anchor links to trigger correctly and close the menu
@@ -36,10 +41,7 @@ FluidbookNav.prototype = {
                 },
             },
 
-            "extensions": [
-                "pagedim-black",
-                "position-front"
-            ],
+            "extensions": extensions,
             "offCanvas": {
                 "position": side,
                 "zposition": "front",
@@ -50,7 +52,8 @@ FluidbookNav.prototype = {
             },
             "rtl": {
                 "use": "detect" // Auto detect when in RTL mode based on html dir attribute
-            }
+            },
+
         }, {
             offCanvas: {
                 page: {