MCPcopy Create free account
hub / github.com/Maps4HTML/MapML.js / _handleChange

Method _handleChange

src/map-extent.js:432–443  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

430 }
431
432 _handleChange() {
433 // add _extentLayer to map if map-extent is checked, otherwise remove it
434 if (this.checked && !this.disabled && this.parentLayer._layer) {
435 // can be added to MapLayer LayerGroup no matter map-layer is checked or not
436 this._extentLayer.addTo(this.parentLayer._layer);
437 this._extentLayer.setZIndex(this.position);
438 } else {
439 this.parentLayer._layer?.removeLayer(this._extentLayer);
440 }
441 // change the checkbox in the layer control to match map-extent.checked
442 // doesn't trigger the event handler because it's not user-caused AFAICT
443 }
444 _validateLayerControlContainerHidden() {
445 let extentsFieldset = this.parentLayer._propertiesGroupAnatomy;
446 if (!extentsFieldset) return;

Callers 2

_validateDisabledMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected