Merge pull request #3564 from rowanwins/layerControlFix
Fix for issue #2771
This commit is contained in:
commit
7e45690169
@ -198,8 +198,13 @@ L.Control.Layers = L.Control.extend({
|
||||
var name = document.createElement('span');
|
||||
name.innerHTML = ' ' + obj.name;
|
||||
|
||||
label.appendChild(input);
|
||||
label.appendChild(name);
|
||||
// Helps from preventing layer control flicker when checkboxes are disabled
|
||||
// https://github.com/Leaflet/Leaflet/issues/2771
|
||||
var holder = document.createElement('div');
|
||||
|
||||
label.appendChild(holder);
|
||||
holder.appendChild(input);
|
||||
holder.appendChild(name);
|
||||
|
||||
var container = obj.overlay ? this._overlaysList : this._baseLayersList;
|
||||
container.appendChild(label);
|
||||
|
Loading…
Reference in New Issue
Block a user