]> _ Git - fluidbook-html5.git/commitdiff
done #1837 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 19 Dec 2017 13:51:11 +0000 (14:51 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 19 Dec 2017 13:51:11 +0000 (14:51 +0100)
js/libs/fluidbook/fluidbook.resize.js
style/fluidbook.less

index 2920dad67fdc8e5c156802a4a80f93638096a138..83aaccdd75b32e41d262f560d51143fe8c038139 100644 (file)
@@ -206,7 +206,7 @@ FluidbookResize.prototype = {
         if (this.fluidbook.help) {
             this.fluidbook.help.resize(this.ww, this.hh, interfaceScale, navScale);
         }
-        $('#loader').css({top:this.hh/2,left:this.ww/2});
+        $('#loader').css({top: this.hh / 2, left: this.ww / 2});
         this.fluidbook.background.resize(this.ww, this.hh);
         if (this.fluidbook.slider) {
             this.fluidbook.slider.resize(this.ww, this.hh, this.orientation == 'portrait');
@@ -245,6 +245,8 @@ FluidbookResize.prototype = {
             }
         }
 
+        this.checkLogoVisibility();
+
         $(window).scrollTop(0);
         $(this.fluidbook).trigger('fluidbook.resize', {ww: this.ww, hh: this.hh, orientation: this.orientation, fluidbookrect: $("#fluidbook").get(0).getBoundingClientRect()});
     },
@@ -256,6 +258,16 @@ FluidbookResize.prototype = {
         $("#next,#previous").show();
     },
 
+    checkLogoVisibility: function () {
+        var logo = document.getElementById("logo").getBoundingClientRect();
+        var fluidbook = document.getElementById("fluidbook").getBoundingClientRect();
+        var hidden = logo.bottom > fluidbook.top && logo.left < fluidbook.right;
+        if (hidden) {
+            $("#logo").addClass('hidden');
+        } else {
+            $("#logo.hidden").removeClass('hidden');
+        }
+    },
 
     resizeSplash: function () {
         if ($("#splash").length == 0) {
index f60280823b59a9caa74ead0a5dd845a1ef08aa87..b624243b94c0f5ca9688f4793493113211edca3d 100644 (file)
@@ -753,6 +753,12 @@ input[type="search"]::-webkit-search-results-decoration {
        top: 0px;
        background-repeat: no-repeat;
        z-index: 10;
+
+       &.hidden {
+               visibility: hidden;
+               pointer-events: none;
+       }
+
        &.overridenByFluidbook, .help & {
                visibility: hidden;
        }