]> _ Git - fluidbook-html5.git/commitdiff
done #1510 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 28 Jun 2017 14:55:08 +0000 (16:55 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 28 Jun 2017 14:55:08 +0000 (16:55 +0200)
js/libs/fluidbook/fluidbook.menu.js
js/libs/fluidbook/fluidbook.nav.js

index 6fa92c42bdafea54140e974642618ab5a81ffd11..1b04a0de76cf7547307484d1d0ea9c773b017415 100644 (file)
@@ -182,9 +182,9 @@ FluidbookMenu.prototype = {
         var a = $('a[href="#/multimedia/' + multimedia + '"]');
         var markup = decodeURIComponent($(a).attr('data-multimedia'));
         var view = '<div class="caption">' + this.closeButton() + '</div>';
-        view += '<div class="content"><div class="multimediaScale">';
+        view += '<div class="content"><div class="multimediaHolder"><div class="multimediaScale">';
         view += markup;
-        view += '</div></div>';
+        view += '</div></div></div>';
 
         var read = multimedia.indexOf('r_') == 0 ? ' data-readmode="1"' : '';
         $("#view").append('<div class="mview" dir="ltr" data-menu="multimedia"' + read + '>' + view + '</div>');
@@ -548,8 +548,16 @@ FluidbookMenu.prototype = {
                     }
                     x = ( w - (nw * s)  ) / 2;
                     y = (h - (nh * s)) / 2;
+
+                    if (s < 1) {
+                        var css = {overflow: 'hidden', width: nw * s, height: nh * s};
+                        m.find('.multimediaHolder').css(css);
+                    } else {
+                        m.find('.multimediaHolder').css({width: '', height: ''});
+                    }
                 }
 
+
                 m.find('.multimediaScale').css({width: nw, height: nh, overflow: 'hidden'}).transform({translateX: x + 'px', translateY: y + 'px', scale: [s, s], origin: [0, 0]}).css('text-align', 'left');
                 break;
             default:
index cbba0fbc493b3b4e5f39f3f67e0892d1c7afa5d2..1792d367daab8bb96c3fcb2504bc2ef27cc3214c 100644 (file)
@@ -195,8 +195,6 @@ FluidbookNav.prototype = {
                 })
             }
 
-            console.log(link);
-            console.log(visible);
             if (!visible) {
                 $(link).addClass('hidden');
             }