@@ -3,7 +3,7 @@ import { extentLayer } from './mapml/layers/ExtentLayer';
33import { createLayerControlExtentHTML } from './mapml/elementSupport/extents/createLayerControlForExtent' ;
44
55/* global M */
6- export class MapExtent extends HTMLElement {
6+ export class HTMLMapExtentElement extends HTMLElement {
77 static get observedAttributes ( ) {
88 return [ 'checked' , 'label' , 'opacity' , 'hidden' ] ;
99 }
@@ -134,7 +134,7 @@ export class MapExtent extends HTMLElement {
134134 return Util . getClosest ( this , 'mapml-viewer,map[is=web-map]' ) ;
135135 }
136136 getLayerEl ( ) {
137- return Util . getClosest ( this , 'layer- ' ) ;
137+ return Util . getClosest ( this , 'map-layer ' ) ;
138138 }
139139 attributeChangedCallback ( name , oldValue , newValue ) {
140140 if ( this . #hasConnected /* jshint ignore:line */ ) {
@@ -234,7 +234,7 @@ export class MapExtent extends HTMLElement {
234234 this . _changeHandler = this . _handleChange . bind ( this ) ;
235235 }
236236 async connectedCallback ( ) {
237- // this.parentNode.host returns the layer- element when parentNode is
237+ // this.parentNode.host returns the map-layer element when parentNode is
238238 // the shadow root
239239 this . parentLayer = this . getLayerEl ( ) ;
240240 if (
@@ -246,8 +246,8 @@ export class MapExtent extends HTMLElement {
246246 await this . mapEl . whenProjectionDefined ( this . units ) . catch ( ( ) => {
247247 throw new Error ( 'Undefined projection:' + this . units ) ;
248248 } ) ;
249- // when projection is changed, the parent layer- ._layer is created (so whenReady is fulfilled) but then removed,
250- // then the map-extent disconnectedCallback will be triggered by layer- ._onRemove() (clear the shadowRoot)
249+ // when projection is changed, the parent map-layer ._layer is created (so whenReady is fulfilled) but then removed,
250+ // then the map-extent disconnectedCallback will be triggered by map-layer ._onRemove() (clear the shadowRoot)
251251 // even before connectedCallback is finished
252252 // in this case, the microtasks triggered by the fulfillment of the removed MapMLLayer should be stopped as well
253253 // !this.isConnected <=> the disconnectedCallback has run before
@@ -430,7 +430,7 @@ export class MapExtent extends HTMLElement {
430430 _handleChange ( ) {
431431 // add _extentLayer to map if map-extent is checked, otherwise remove it
432432 if ( this . checked && ! this . disabled ) {
433- // can be added to mapmllayer layerGroup no matter layer- is checked or not
433+ // can be added to mapmllayer layerGroup no matter map-layer is checked or not
434434 this . _extentLayer . addTo ( this . parentLayer . _layer ) ;
435435 this . _extentLayer . setZIndex (
436436 Array . from (
@@ -462,8 +462,8 @@ export class MapExtent extends HTMLElement {
462462 }
463463 }
464464 disconnectedCallback ( ) {
465- // in case of projection change, the disconnectedcallback will be triggered by removing layer- ._layer even before
466- // map-extent.connectedcallback is finished (because it will wait for the layer- to be ready)
465+ // in case of projection change, the disconnectedcallback will be triggered by removing map-layer ._layer even before
466+ // map-extent.connectedcallback is finished (because it will wait for the map-layer to be ready)
467467 // !this._extentLayer <=> this.connectedCallback has not yet been finished before disconnectedCallback is triggered
468468 if (
469469 this . hasAttribute ( 'data-moving' ) ||
0 commit comments