mobile webkit svg flicker fix
This commit is contained in:
parent
6c960edf22
commit
33236d5e89
@ -13,6 +13,10 @@ L.Path.VML = (function() {
|
||||
})();
|
||||
|
||||
L.Path = !L.Path.VML? L.Path : L.Path.extend({
|
||||
statics: {
|
||||
CLIP_PADDING: 0.02
|
||||
},
|
||||
|
||||
_createElement: (function() {
|
||||
document.createStyleSheet().addRule('.lvml', 'behavior:url(#default#VML); display: inline-block; position: absolute;');
|
||||
try {
|
||||
|
@ -85,12 +85,19 @@ L.Path = L.Class.extend({
|
||||
max = vp.max,
|
||||
width = max.x - min.x,
|
||||
height = max.y - min.y,
|
||||
root = this._map._pathRoot;
|
||||
root = this._map._pathRoot,
|
||||
pane = this._map._panes.overlayPane;
|
||||
|
||||
// Hack to make flicker on drag end on mobile webkit less irritating
|
||||
// Unfortunately I haven't found a good workaround for this yet
|
||||
if (L.Browser.mobileWebkit) { pane.removeChild(root); }
|
||||
|
||||
L.DomUtil.setPosition(root, min);
|
||||
root.setAttribute('width', width);
|
||||
root.setAttribute('height', height);
|
||||
root.setAttribute('viewBox', [min.x, min.y, width, height].join(' '));
|
||||
L.DomUtil.setPosition(root, min);
|
||||
|
||||
if (L.Browser.mobileWebkit) { pane.appendChild(root); }
|
||||
},
|
||||
|
||||
_updateViewport: function() {
|
||||
|
Loading…
Reference in New Issue
Block a user