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:
parent
3676e94e0f
commit
3ccbe5bca0
@ -91,8 +91,6 @@ These changes were targeted at removing any hardcoded projection-specific logic
|
|||||||
|
|
||||||
### Animations refactoring
|
### 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)
|
* 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
|
## Other performance improvements
|
||||||
|
@ -146,13 +146,13 @@ L.DomUtil = {
|
|||||||
'translate3d(' + pos.x + 'px,' + pos.y + 'px' + ',0)' + (scale ? ' scale(' + scale + ')' : '');
|
'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 */
|
/*eslint-disable */
|
||||||
el._leaflet_pos = point;
|
el._leaflet_pos = point;
|
||||||
/*eslint-enable */
|
/*eslint-enable */
|
||||||
|
|
||||||
if (L.Browser.any3d && !no3d) {
|
if (L.Browser.any3d) {
|
||||||
L.DomUtil.setTransform(el, point);
|
L.DomUtil.setTransform(el, point);
|
||||||
} else {
|
} else {
|
||||||
el.style.left = point.x + 'px';
|
el.style.left = point.x + 'px';
|
||||||
|
@ -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
|
// 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
|
// 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
|
// save tile in cache
|
||||||
this._tiles[key] = {
|
this._tiles[key] = {
|
||||||
|
Loading…
Reference in New Issue
Block a user