]> _ Git - fluidbook-html5.git/commitdiff
wip #2657 @2
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 29 Mar 2019 19:09:58 +0000 (20:09 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 29 Mar 2019 19:09:58 +0000 (20:09 +0100)
js/libs/fluidbook/fluidbook.desktop.js
js/libs/fluidbook/fluidbook.help.js
js/libs/fluidbook/fluidbook.js
js/libs/fluidbook/fluidbook.resize.js
js/libs/fluidbook/fluidbook.support.js
style/fluidbook.less

index 12124e1f121e685e1198e8c6218124163e0a43c7..961953ad0954990e1eb0bf130e9a9b967d8bcd1a 100644 (file)
@@ -25,10 +25,11 @@ FluidbookDesktop.prototype = {
             e.stopPropagation();
         })
 
-        $(document).on('mousewheel', function (e) {
-            $this.wheelZoom(e.deltaY);
-        })
-
+        if (!this.fluidbook.mobilefirst.enabled) {
+            $(document).on('mousewheel', function (e) {
+                $this.wheelZoom(e.deltaY);
+            });
+        }
 
         $(document).on('mousemove', 'body', function (e) {
             $this.moveZoom(e);
index 2b80b5c75a311ac71d86c9f340785b5287f5010f..7c0295f28a90f3441353efa90fecefe24fa9bfcd 100644 (file)
@@ -229,17 +229,19 @@ FluidbookHelp.prototype = {
         this.view.find('.next, .last').css(nextPosition);
 
         // Slider label
-        var positionSliderLabel = function () {
-            var sliderHelp = $this.view.find('.slider');
-            var sliderCursor = $('#slidercursor .visible');
-            sliderHelp.css({
-                bottom: Math.round(hh - sliderCursor.offset().top),
-                left: Math.round(sliderCursor.offset().left + (sliderCursor.width() / 2)),
-                transformOrigin: 'left bottom'
-            });
-        };
-        positionSliderLabel(); // Run immediately
-        setTimeout(positionSliderLabel, 250); // delay slightly to make sure co-ordinates are correct
+        if ($("#slider").length > 0) {
+            var positionSliderLabel = function () {
+                var sliderHelp = $this.view.find('.slider');
+                var sliderCursor = $('#slidercursor .visible');
+                sliderHelp.css({
+                    bottom: Math.round(hh - sliderCursor.offset().top),
+                    left: Math.round(sliderCursor.offset().left + (sliderCursor.width() / 2)),
+                    transformOrigin: 'left bottom'
+                });
+            };
+            positionSliderLabel(); // Run immediately
+            setTimeout(positionSliderLabel, 250); // delay slightly to make sure co-ordinates are correct
+        }
 
         this.view.find('#icons').css({
             top: menuHeightScaled,
index 644d1153a9d0786c9aa6371d385ce62e02ca0d6c..38b6330a0a5bd47be9eae27f41d9a21080075c94 100644 (file)
@@ -254,7 +254,9 @@ Fluidbook.prototype = {
 
         this.nav = new FluidbookNav(this);
         this.interface = new FluidbookInterface(this);
-        this.slider = new FluidbookSlider(this);
+        if (!this.mobilefirst.enabled) {
+            this.slider = new FluidbookSlider(this);
+        }
         this.help = new FluidbookHelp(this);
         this.help.displayAtStartup();
 
index ce869c8383cc359fccc9f8143ae1cc9b945d02f4..9ba7242204d009d5b91d48dd74512c2a07288bbc 100644 (file)
@@ -400,7 +400,6 @@ FluidbookResize.prototype = {
 
 
         var changeOrientation = forceChange || this.orientation !== newo;
-        var force = this.fluidbook.datas.mobileNavigationType != 'book';
 
         this.orientation = newo;
 
index c46d56ed778955bb9c165d826bff3c4a734ff072..e81249331a2bf883719a48143fa4b9516b53e536 100644 (file)
@@ -157,7 +157,7 @@ FluidbookSupport.prototype = {
     },
     getOrientation: function () {
         try {
-            if (this.fluidbook.pad && this.fluidbook.pad.enabled) {
+            if ((this.fluidbook.pad && this.fluidbook.pad.enabled) || this.fluidbook.mobilefirst.enabled) {
                 return 0;
             } else if (this.fluidbook.datas.mobileNavigationType === 'landscape') {
                 return 90;
index 7ecc7258f0a00e1deeda3948814ba3f60c456204..89f35d0b6df64d1b598db98cf5f56eb9c8acd7f6 100644 (file)
@@ -686,6 +686,10 @@ body, html {
     text-align: center;
     display: inline-block;
   }
+
+  .mobilefirst & {
+    display: none;
+  }
 }
 
 .portrait #pagesnumbers .right {