]> _ Git - fluidbook-html5.git/commitdiff
wip #1445 @1.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 19 Jun 2017 15:12:53 +0000 (17:12 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 19 Jun 2017 15:12:53 +0000 (17:12 +0200)
js/libs/fluidbook/fluidbook.slider.js
style/fluidbook.less

index 042226c26ce43e85789051466ac47ff6de059e1e..8db973c59031b6f42cf6a6f8b26ff05808d2d091 100644 (file)
@@ -23,19 +23,20 @@ FluidbookSlider.prototype = {
         });
 
         $("#slidercursor").on('mousedown', function (e) {
-            $this.dragCursor(e, false, false);
+            $this.dragCursor(e, false, true);
+            return true;
         });
 
         interact(document.getElementById("slidercursor")).draggable({
             inertia: false,
             onstart: function (event) {
-                return $this.dragCursor(event, false);
+                return $this.dragCursor(event, false, true);
             },
             onmove: function (event) {
-                return $this.dragCursor(event, false);
+                return $this.dragCursor(event, false, true);
             },
             onend: function (event) {
-                return $this.dragCursor(event, true);
+                return $this.dragCursor(event, true, true);
             }
         });
 
@@ -88,6 +89,7 @@ FluidbookSlider.prototype = {
             this.fluidbook.setCurrentPage(page);
         }
         if (updateCursor) {
+            console.log('move to page ' + page);
             this.updateCursorPosition(page);
         }
         return false;
@@ -147,8 +149,12 @@ FluidbookSlider.prototype = {
 
         $("#slidercursor").css('left', this.getCursorXByPage(page));
 
-        if ($("#sliderthumb").is(':visible') && !$("#slider").hasClass('hover')) {
-            this.updateThumb(page);
+        if ($("#sliderthumb").is(':visible')) {
+            if ($("#slider").hasClass('hover') && !$("#slider").hasClass('drag')) {
+
+            } else {
+                this.updateThumb(page);
+            }
         }
     },
 
index 882361df4f30a25bfad1555a056c2a4a6cb309d5..c45f311bdeae4f2bee22f1208790daf4015d512e 100644 (file)
@@ -175,11 +175,11 @@ body, html {
 /* Desktop devices */
 
 .desktop #links {
-       cursor: url("images/cur-zoom-in.cur"), url("../images/cur-zoom-in.cur"), zoom-in;
+       cursor: zoom-in;
 }
 
 .desktop.zoomed #links {
-       cursor: url("images/cur-zoom-out.cur"), url("../images/cur-zoom-out.cur"), zoom-out;
+       cursor: zoom-out;
 }
 
 #links .link {