trigger tile compositing in Safari

This kind of reverts #2377 that doesn’t make sense after tile animation
refactorings, because it makes Safari terribly slow. It reintroduces
the tile gaps, but oh well, we choose the lesser evil here.

Also, performance in latest iOS is the same with and without the patch
so there’s no harm in removing this.
This commit is contained in:
Vladimir Agafonkin 2015-06-04 19:15:19 +03:00
parent 3676e94e0f
commit 3ccbe5bca0
3 changed files with 3 additions and 5 deletions

View File

@ -91,8 +91,6 @@ These changes were targeted at removing any hardcoded projection-specific logic
### Animations refactoring
* Improved performance in iOS Safari; pinch-zooming should be smoother now. [#2377](https://github.com/Leaflet/Leaflet/pull/2377)
* Fixed gaps between tiles during animations in desktop Safari. [#2377](https://github.com/Leaflet/Leaflet/pull/2377)
* Improved panning inertia behavior so that there are no tearing during animation when panning around quickly. [#2360](https://github.com/Leaflet/Leaflet/issues/2360)
## Other performance improvements

View File

@ -146,13 +146,13 @@ L.DomUtil = {
'translate3d(' + pos.x + 'px,' + pos.y + 'px' + ',0)' + (scale ? ' scale(' + scale + ')' : '');
},
setPosition: function (el, point, no3d) { // (HTMLElement, Point[, Boolean])
setPosition: function (el, point) { // (HTMLElement, Point[, Boolean])
/*eslint-disable */
el._leaflet_pos = point;
/*eslint-enable */
if (L.Browser.any3d && !no3d) {
if (L.Browser.any3d) {
L.DomUtil.setTransform(el, point);
} else {
el.style.left = point.x + 'px';

View File

@ -556,7 +556,7 @@ L.GridLayer = L.Layer.extend({
// we prefer top/left over translate3d so that we don't create a HW-accelerated layer from each tile
// which is slow, and it also fixes gaps between tiles in Safari
L.DomUtil.setPosition(tile, tilePos, true);
L.DomUtil.setPosition(tile, tilePos);
// save tile in cache
this._tiles[key] = {