Skip to content

Commit 19f46ee

Browse files
committed
Remove 'foo' / 'extentload' event, no longer necessary
1 parent b2f9f08 commit 19f46ee

File tree

3 files changed

+1
-21
lines changed

3 files changed

+1
-21
lines changed

src/layer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ export class MapLayer extends HTMLElement {
222222
// user checking/unchecking the layer from the layer control
223223
// this must be done *after* the layer is actually added to the map
224224
this._layer.on('add remove', this._onLayerChange, this);
225-
this._layer.on('add remove foo', this._validateDisabled, this);
225+
this._layer.on('add remove', this._validateDisabled, this);
226226
// toggle the this.disabled attribute depending on whether the layer
227227
// is: same prj as map, within view/zoom of map
228228
this._layer._map.on('moveend layeradd', this._validateDisabled, this);

src/mapml/control/LayerControl.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ export var LayerControl = L.Control.Layers.extend({
6363
// on the map it does not generate layer events
6464
for (var i = 0; i < this._layers.length; i++) {
6565
this._layers[i].layer.off('add remove', this._onLayerChange, this);
66-
this._layers[i].layer.off('foo', this._validateInput, this);
6766
}
6867
},
6968
addOrUpdateOverlay: function (layer, name) {
@@ -163,11 +162,6 @@ export var LayerControl = L.Control.Layers.extend({
163162
obj.input.layerId = L.stamp(obj.layer);
164163

165164
L.DomEvent.on(obj.input, 'click', this._onInputClick, this);
166-
// this is necessary because when there are several layers in the
167-
// layer control, the response to the last one can be a long time
168-
// after the info is first displayed, so we have to go back and
169-
// verify the layer element is not disabled and can have an enabled input.
170-
obj.layer.on('foo', this._validateInput, this);
171165
this._overlaysList.appendChild(layercontrols);
172166
return layercontrols;
173167
},

src/mapml/layers/MapMLLayer.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -174,19 +174,6 @@ export var MapMLLayer = L.Layer.extend({
174174
this._properties._mapExtents[0]._templateVars
175175
) {
176176
createAndAdd();
177-
} else {
178-
// wait for extent to be loaded
179-
this.once(
180-
'foo',
181-
function () {
182-
if (!this._validProjection(map)) {
183-
this.validProjection = false;
184-
return;
185-
}
186-
createAndAdd();
187-
},
188-
this
189-
);
190177
}
191178
this._setLayerElExtent();
192179

@@ -896,7 +883,6 @@ export var MapMLLayer = L.Layer.extend({
896883
// if layer does not have a parent Element, do not need to set Controls
897884
layer._layerEl.parentElement._toggleControls();
898885
}
899-
layer.fire('foo', layer, false);
900886
// local functions
901887
// sets layer._properties.projection. Supposed to replace / simplify
902888
// the dependencies on convoluted getProjection() interface, but doesn't quite

0 commit comments

Comments
 (0)