]> _ Git - fluidbook-html5.git/commitdiff
wip #4083 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 20 Nov 2020 20:44:59 +0000 (21:44 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 20 Nov 2020 20:44:59 +0000 (21:44 +0100)
js/libs/fluidbook/fluidbook.links.js
js/libs/fluidbook/slideshow/fluidbook.slideshow.dummy.js
js/libs/fluidbook/slideshow/fluidbook.slideshow.js
style/fluidbook.less
style/slideshow/dummy.less
style/slideshow/splide.less
style/slideshow/vacheron.less

index 710c73414f0e729a93145b43e8faab0f7f33824c..40245e9ac1df716bcf8aaf3ac661e77af6a88207 100644 (file)
@@ -741,6 +741,7 @@ FluidbookLinks.prototype = {
 
     initInlineSlideshows: function () {
         var $this = this;
+        this.fluidbook.slideshow.clear();
         $(".inlineslideshow").each(function () {
             if ($(this).is(':visible')) {
                 $this.fluidbook.slideshow.initInlineSlideshow($(this));
index 08d24a14ae8d09bb6381b5305a95389911e96bc8..7273de15a950f6e000270bd3c80ae204e88e6262 100644 (file)
@@ -4,7 +4,16 @@ function FluidbookDummySlideshow(fluidbook) {
 }
 
 FluidbookDummySlideshow.prototype = {
+    clear: function () {
+        $.each(this.intervals, function (k, v) {
+            clearInterval(v);
+        });
+    },
+
     initSlideshow: function (s) {
+        if ($(s).data('init') === true) {
+            return;
+        }
         var $this = this;
         s.data('init', true);
         var dir = 'data/links/' + $(s).data('dir') + '/';
@@ -30,7 +39,7 @@ FluidbookDummySlideshow.prototype = {
                     $(current).removeClass('show').css('display', 'none');
                     $(this).css({zIndex: ''});
                 });
-            }, 100);
+            }, 200);
 
         }, parseFloat(this.fluidbook.settings.inlineSlideshowDuration) * 1000));
     },
index 1379a2147ab94294e9e6c0965c10b54646571776..bc7de5a4ecedf55b8ab044d20483c887f1a4e761 100644 (file)
@@ -39,6 +39,19 @@ FluidbookSlideshow.prototype = {
         return $(s);
     },
 
+    clear: function () {
+        try {
+            this.inlineInstance.clear();
+        } catch (e) {
+
+        }
+        try {
+            this.popupInstance.clear();
+        } catch (e) {
+
+        }
+    },
+
     initPopupSlideshow: function (s) {
         var s = this.normalizeSlideshowElement(s);
         this.popupInstance.initSlideshow(s);
index 03ebb41d4d8e9d70ea44d894f62bdc78c7c15397..d06b86fac8e825aa74ee6c2c536447dff4fc7366 100644 (file)
@@ -2859,34 +2859,6 @@ body > input {
   }
 }
 
-.inlineslideshow {
-  width: 100%;
-  height: 100%;
-  max-width: 100%;
-  max-height: 100%;
-  overflow: hidden;
-
-  .slide {
-    display: none;
-    width: 100%;
-    height: 100%;
-    background-size: cover;
-    background-position: 50% 50%;
-    opacity: 0;
-
-    position: absolute;
-    top: 0;
-    left: 0;
-    z-index: 0;
-
-    &.show {
-      z-index: 1;
-      opacity: 1;
-      transition: opacity @inlineslideshow-transition-time;
-    }
-  }
-}
-
 #links .fb_iframe_widget {
   transform-origin: 0 0 0;
   transform: scale(2.5);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..a90c26171450548a9bda38cfa32f548b30aee57f 100644 (file)
@@ -0,0 +1,30 @@
+@import "../variables";
+
+.inlineslideshow {
+  width: 100%;
+  height: 100%;
+  max-width: 100%;
+  max-height: 100%;
+  overflow: hidden;
+
+  .slide {
+    display: none;
+    width: 100%;
+    height: 100%;
+    background-size: cover;
+    background-position: 50% 50%;
+
+    opacity: 0;
+    position: absolute;
+    top: 0;
+    left: 0;
+    z-index: 0;
+
+
+    &.show {
+      transition: opacity @inlineslideshow-transition-time;
+      z-index: 1;
+      opacity: 1;
+    }
+  }
+}
\ No newline at end of file
index c9e216ccd7d85bcc51733680c7011c5a56e9d228..aeac61b5f31637b75b82b74267aba0a49c007587 100644 (file)
@@ -1,3 +1,5 @@
+@import "../variables";
+
 // Splide JS Styling (adapted from SCSS)
 @main-color: @menu-select-background;
 @light-main-color: lighten(@main-color, 20%);
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..916afb4c45e0b689db8602e1da77b33cf714f8cd 100644 (file)
@@ -0,0 +1 @@
+@import "../variables";
\ No newline at end of file