]> _ Git - fluidbook-html5.git/commitdiff
wait #7434 @0.75
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 3 Apr 2025 11:18:41 +0000 (13:18 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 3 Apr 2025 11:18:41 +0000 (13:18 +0200)
js/libs/fluidbook/slideshow/fluidbook.slideshow.vacheron.js
style/slideshow/vacheron.less

index 031295eb05fb64ec0608fa1014a85301903c4651..d733b44bfa0ba80a3d21cf80e9ae25b536bc0ca1 100644 (file)
@@ -1,6 +1,6 @@
 function FluidbookVacheronSlideshow(fluidbook) {
     this.fluidbook = fluidbook;
-    this.name='vacheron';
+    this.name = 'vacheron';
     this.initEvents();
 }
 
@@ -36,7 +36,7 @@ FluidbookVacheronSlideshow.prototype = {
             navClass += ' compact';
         }
 
-        var nav = $('<nav class="fb-slideshow-nav' + navClass + '"><a href="#" class="fb-slideshow-nav-prev">' + getSpriteIcon('chevron-bold') + '</a></nav>');
+        var nav = $('<nav class="fb-slideshow-nav' + navClass + ' fb-slideshow-size-' + this.fluidbook.settings.slideshowControlsSize + '"><a href="#" class="fb-slideshow-nav-prev">' + getSpriteIcon('chevron-bold') + '</a></nav>');
         var i = 0;
         $(s).find('.fb-slideshow-slide').each(function () {
             $(nav).append('<a href="#" class="fb-slideshow-nav-index" data-index="' + i + '"></a>');
@@ -122,13 +122,20 @@ FluidbookVacheronSlideshow.prototype = {
         var fullscreen = false;
         var w, h;
         var s = $(m).find('.fb-slideshow-wrapper');
+
+        let navScale = 1;
+        var navheight = 75;
+        if (this.fluidbook.settings.slideshowControlsSize === 'big') {
+            navheight = 75;
+            navScale=1.5;
+        }
+
         m.find('.caption, .back').addClass('nocaption');
         if (ww < 800) {
             fullscreen = true;
             w = ww;
             h = hh;
         } else {
-            var navheight = 75;
             var meta = $(s).find('.fb-slideshow-slide:eq(0) img').data('meta');
             var scale = Math.min(((hh * 0.9) - navheight) / meta.height, (ww * 0.9) / meta.width);
             w = meta.width * scale;
@@ -137,7 +144,7 @@ FluidbookVacheronSlideshow.prototype = {
 
         $(s).css({width: w, height: h});
         var nav = $(s).find('.fb-slideshow-nav');
-        var navLeft = (w - $(nav).outerWidth()) / 2;
+        var navLeft = (w - $(nav).outerWidth() * navScale) / 2;
         var transform = '';
         if (navLeft < 0) {
             navLeft = 0;
@@ -145,7 +152,6 @@ FluidbookVacheronSlideshow.prototype = {
         }
         $(nav).css({left: navLeft, transform: transform});
 
-
         return {w: w, h: h, fullscreen: fullscreen};
     },
 
index 830957475a4db371382e058a6d2e3dd88542dbf7..75483b10d61b85eae6c2a03d2b40f4bb31c8341a 100644 (file)
       white-space: nowrap;
       transform-origin: 0 0;
 
+      &.fb-slideshow-size-big {
+        transform: scale(1.5);
+        bottom: 20px;
+      }
+
       .fb-slideshow-nav-prev, .fb-slideshow-nav-next {
         @w: 40px;
         display: inline-block;
         }
       }
 
-      &.compact{
+      &.compact {
         .fb-slideshow-nav-index {
           margin: 0 8px;
         }
         background-color: transparent;
 
         &:after {
-          content:".";
+          content: ".";
           text-indent: -6666px;
           position: absolute;
           top: -1px;