]> _ Git - fluidbook-html5.git/commitdiff
wip #2299 @0:10
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 23 Oct 2018 17:05:20 +0000 (19:05 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 23 Oct 2018 17:05:20 +0000 (19:05 +0200)
js/libs/fluidbook/fluidbook.js
js/libs/fluidbook/fluidbook.menu.js
js/libs/fluidbook/menu/fluidbook.index.js

index 1dbac033786ffb584089610112cd525cb68ff647..48204fc280d124b2bb22cce50030a03ef01a52cb 100644 (file)
@@ -20,6 +20,8 @@ Fluidbook.BOTTOM = 9;
 Fluidbook.prototype = {
     init: function (datas) {
         this.datas = datas;
+        this.singleMode = (this.datas.mobileNavigationType === 'portrait');
+
         this.junk = datas.cacheDate;
         if (this.datas.landingPage != undefined && this.datas.landingPage != '') {
             this.landingpage = new FluidbookLandingPage(this);
@@ -53,6 +55,7 @@ Fluidbook.prototype = {
         this.sound = new FluidbookSound(this);
         this.slideshow = new FluidbookSlideshow(this);
 
+
         if (this.datas.basket) {
             this.cart = new FluidbookCart(this);
         }
@@ -66,6 +69,7 @@ Fluidbook.prototype = {
             this.form == false;
         }
         this.privacy = new FluidbookPrivacy(this);
+
         this.refw = 0;
         this.refh = 0;
         this.searchString = '';
index fc5c6c88b1ec3188f0b846aa0843d9b5775904a0..10200c8b8895551abd31de36a5b2982f2536f643 100644 (file)
@@ -429,8 +429,11 @@ FluidbookMenu.prototype = {
         $("#view").append('<div class="mview" data-menu="index">' + index + '</div>');
         // Mark current page
         var cp = this.fluidbook.currentPage;
-        if (cp % 2 == 1) {
-            cp--;
+
+        if (!this.fluidbook.singleMode) {
+            if (cp % 2 == 1) {
+                cp--;
+            }
         }
         $("#view").find('.doubleThumb[page="' + cp + '"]').addClass('here');
         this.fluidbook.bookmarks.updateBookmarks();
index a2e92d7aa0301d3c65f447ce4b52c780b1df6e50..7d610647dd5a2e0b72c2272fe8ee35d31645f304 100644 (file)
@@ -7,7 +7,7 @@ FluidbookIndex.prototype = {
     init: function () {
         this.normalHTML = '';
         this.padHTML = '';
-        this.singleMode = this.fluidbook.datas.mobileNavigationType === 'portrait';
+        this.singleMode = this.fluidbook.singleMode;
     },
 
     getView: function (group) {