]> _ Git - fluidbook-html5.git/commitdiff
reduce image resolution for old iphones #1404
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 11 May 2017 15:23:58 +0000 (17:23 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 11 May 2017 15:23:58 +0000 (17:23 +0200)
js/libs/fluidbook/fluidbook.support.js

index d24071da83b762a16677177b1eeecbcc62284587..71b79fafd0b4502b07fc205beb54351b18f0b266 100644 (file)
@@ -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;