MCPcopy Index your code
hub / github.com/Maps4HTML/MapML.js / _disableLink

Method _disableLink

src/map-link.js:341–373  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

339 }
340 }
341 _disableLink() {
342 switch (this.rel.toLowerCase()) {
343 case 'tile':
344 case 'image':
345 case 'features':
346 // tile, image, features
347 if (
348 this._templatedLayer &&
349 this.parentExtent?._extentLayer?.hasLayer(this._templatedLayer)
350 ) {
351 this.parentExtent._extentLayer.removeLayer(this._templatedLayer);
352 delete this._templatedLayer;
353 this.shadowRoot.innerHTML = '';
354 this.getLayerEl()._validateDisabled();
355 }
356 break;
357 case 'query':
358 delete this._templateVars;
359 if (this.shadowRoot) {
360 this.shadowRoot.innerHTML = '';
361 }
362 this.getLayerEl()._validateDisabled();
363 break;
364 case 'stylesheet':
365 delete this._pmtilesRules;
366 delete this._stylesheetHost;
367 if (this.link) {
368 this.link.remove();
369 delete this.link;
370 }
371 break;
372 }
373 }
374 async _enableLink() {
375 switch (this.rel.toLowerCase()) {
376 case 'tile':

Callers 1

Calls 3

getLayerElMethod · 0.95
removeMethod · 0.80
_validateDisabledMethod · 0.45

Tested by

no test coverage detected