From: Vincent Vanwaelscappel Date: Tue, 19 Dec 2017 13:51:11 +0000 (+0100) Subject: done #1837 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=1659e4e42ab4389680f9338fc4b6a857cd1ecb11;p=fluidbook-html5.git done #1837 @1 --- diff --git a/js/libs/fluidbook/fluidbook.resize.js b/js/libs/fluidbook/fluidbook.resize.js index 2920dad6..83aaccdd 100644 --- a/js/libs/fluidbook/fluidbook.resize.js +++ b/js/libs/fluidbook/fluidbook.resize.js @@ -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) { diff --git a/style/fluidbook.less b/style/fluidbook.less index f6028082..b624243b 100644 --- a/style/fluidbook.less +++ b/style/fluidbook.less @@ -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; }