From: Vincent Vanwaelscappel Date: Thu, 11 May 2017 15:23:58 +0000 (+0200) Subject: reduce image resolution for old iphones #1404 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=ceee67117d5fd63762070e920792b35521669de5;p=fluidbook-html5.git reduce image resolution for old iphones #1404 --- diff --git a/js/libs/fluidbook/fluidbook.support.js b/js/libs/fluidbook/fluidbook.support.js index d24071da..71b79faf 100644 --- a/js/libs/fluidbook/fluidbook.support.js +++ b/js/libs/fluidbook/fluidbook.support.js @@ -15,10 +15,15 @@ function FluidbookSupport(fluidbook) { this.transitionendevent = null; if (window.resolution == 'auto') { - this.resolution = Modernizr.mq('(-webkit-min-device-pixel-ratio: 2)') ? 300 : 150; + if (Modernizr.mq('(min-device-width : 320px) and (max-device-width : 480px)')) { + this.resolution = 150; + } else { + this.resolution = Modernizr.mq('(-webkit-min-device-pixel-ratio: 2)') ? 300 : 150; + } } else { this.resolution = window.resolution; } + console.log('Images resolution :: ' + this.resolution); this.isMobile = isMobile(); this.SVG = Modernizr.svg && this.fluidbook.datas.mobileIconVector;