From 3797ac3ce7f1d8aa5f3a26874a59fbb913022706 Mon Sep 17 00:00:00 2001 From: Vladimir Agafonkin Date: Tue, 12 Nov 2013 00:52:03 +0200 Subject: [PATCH] Fix tiles bluriness regression in Chrome, ref #2078 --- dist/leaflet.css | 4 ---- src/layer/tile/TileLayer.js | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dist/leaflet.css b/dist/leaflet.css index 82a1a5b3..3e17bf61 100644 --- a/dist/leaflet.css +++ b/dist/leaflet.css @@ -42,10 +42,6 @@ .leaflet-container img.leaflet-image-layer { max-width: 15000px !important; } -/* Android chrome makes tiles disappear without this */ -.leaflet-tile-container img { - -webkit-backface-visibility: hidden; -} .leaflet-tile { filter: inherit; visibility: hidden; diff --git a/src/layer/tile/TileLayer.js b/src/layer/tile/TileLayer.js index 0f27b063..e6e02f20 100644 --- a/src/layer/tile/TileLayer.js +++ b/src/layer/tile/TileLayer.js @@ -521,6 +521,9 @@ L.TileLayer = L.Class.extend({ if (L.Browser.ielt9 && this.options.opacity !== undefined) { L.DomUtil.setOpacity(tile, this.options.opacity); } + if (L.Browser.mobileWebkit3d) { + tile.style.webkitBackfaceVisibility = 'hidden'; + } return tile; },