]> _ Git - fluidbook-html5.git/commitdiff
wait #5198 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 31 Mar 2022 14:02:28 +0000 (16:02 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 31 Mar 2022 14:02:28 +0000 (16:02 +0200)
js/libs/fluidbook/fluidbook.desktop.js
js/libs/fluidbook/fluidbook.js
js/libs/fluidbook/fluidbook.links.js
js/libs/fluidbook/fluidbook.touch.js
style/fluidbook.less

index 0d253b62ee508e2da52a54831f4f089dea604ee5..08fef84c3cd53de6b2719d12a7db7567fac3bf41 100644 (file)
@@ -16,7 +16,7 @@ FluidbookDesktop.prototype = {
             }
         });
         $(document).on('click', '#links', function (e) {
-            if ($this.fluidbook.zoom.enabled && $this.fluidbook.input.isUsingMouse()) {
+            if ($this.fluidbook.zoom.enabled && $this.fluidbook.input.isUsingMouse() && !this.fluidbook.hasDraggableOnPage()) {
                 $this.clickZoom(e);
                 return false;
             }
index f7e7afd8b98d4bfb9ab0031d233f96da8a881c85..9f13a245b2d339febe1159f3b39fbb5cd832ec37 100644 (file)
@@ -46,6 +46,16 @@ Fluidbook.prototype = {
         });
     },
 
+    hasDraggableOnPage: function (v) {
+        if (v === undefined) {
+            return $('body').hasClass('draggable-on-page');
+        } else if (v) {
+            $('body').addClass('draggable-on-page');
+        } else {
+            $('body').removeClass('draggable-on-page');
+        }
+    },
+
     _boolean: function (v) {
         if (v === undefined || v === null || v === '0' || v === 0 || v === 'false' || !v) {
             return false;
index 6200b46bbd5f2cf9b7a2c57e7a0bcb73638d934a..2e8b978318096172791d306a99905bcd12b205ef 100644 (file)
@@ -787,9 +787,7 @@ FluidbookLinks.prototype = {
                 countup.start();
             }, to.delay * 1000);
         } else if (animation.type === 'draggable') {
-            if (this.fluidbook.touch) {
-                this.fluidbook.touch.hasDraggableOnPage = true;
-            }
+            this.fluidbook.hasDraggableOnPage(true);
             $(link).css('pointer-events', 'auto');
             var $this = this;
             var draggable = new Draggable(link, {
index 52a54ed4984b6b6a80b08608f700c89d1e35edd4..243f2a4c8db649b320de5d78ca800b6bd4b10e6f 100644 (file)
@@ -13,7 +13,6 @@ function FluidbookTouch(fluidbook) {
     this.triggerOffset = this.fluidbook.mobilefirst.enabled ? 0.1 : 0.05;
 
     this.draggingFromOutside = false;
-    this.hasDraggableOnPage = false;
 
     this.init();
 }
@@ -33,7 +32,8 @@ FluidbookTouch.prototype = {
         // }
 
         $(this.fluidbook).on('fluidbook.page.change.start', function () {
-            $this.draggingFromOutside = $this.hasDraggableOnPage = false;
+            $this.draggingFromOutside = false;
+            $this.fluidbook.hasDraggableOnPage(false);
         });
 
         $(this.fluidbook).on('fluidbook.page.change.end', function () {
@@ -264,7 +264,7 @@ FluidbookTouch.prototype = {
             }
 
             var ltr = this.fluidbook.l10n.dir === 'ltr';
-            if (!this.draggingFromOutside && !this.hasDraggableOnPage) {
+            if (!this.draggingFromOutside && !this.fluidbook.hasDraggableOnPage()) {
                 if ((this.offsetX < 0 && ltr) || (this.offsetX > 0 && !ltr)) {
                     this.fluidbook.goNextPage();
                 } else {
index 4474036c3ad56c7060aa180553a8e22566903f1e..1f9cf770cfa650fe6ca2646aad18b07592ef8654 100644 (file)
@@ -232,7 +232,7 @@ body, html {
 }
 
 /* Desktop devices */
-.using-mouse.msie body:not(.zoom-disabled) {
+.using-mouse.msie body:not(.zoom-disabled):not(.draggable-on-page) {
   #links .container {
     cursor: url(images/cursors/zoom-in.cur), auto;
   }
@@ -244,7 +244,7 @@ body, html {
   }
 }
 
-&.using-mouse.no-msie body:not(.zoom-disabled) {
+&.using-mouse.no-msie body:not(.zoom-disabled):not(.draggable-on-page) {
   #links .container {
     cursor: zoom-in;
   }