File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ export class MapViewer extends HTMLElement {
6464 let reAttach = this . removeChild ( layer ) ;
6565 this . appendChild ( reAttach ) ;
6666 }
67+ if ( this . _debug ) for ( let i = 0 ; i < 2 ; i ++ ) this . toggleDebug ( ) ;
6768 } else this . dispatchEvent ( new CustomEvent ( 'createmap' ) ) ;
6869 } else throw new Error ( "Undefined Projection" ) ;
6970 }
@@ -475,8 +476,7 @@ export class MapViewer extends HTMLElement {
475476 }
476477
477478 toggleDebug ( ) {
478- let mapEl = this ;
479- if ( mapEl . _debug ) {
479+ if ( this . _debug ) {
480480 this . _debug . remove ( ) ;
481481 this . _debug = undefined ;
482482 } else {
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ export class WebMap extends HTMLMapElement {
6565 let reAttach = this . removeChild ( layer ) ;
6666 this . appendChild ( reAttach ) ;
6767 }
68+ if ( this . _debug ) for ( let i = 0 ; i < 2 ; i ++ ) this . toggleDebug ( ) ;
6869 } else this . dispatchEvent ( new CustomEvent ( 'createmap' ) ) ;
6970 } else throw new Error ( "Undefined Projection" ) ;
7071 }
@@ -509,8 +510,7 @@ export class WebMap extends HTMLMapElement {
509510 }
510511
511512 toggleDebug ( ) {
512- let mapEl = this ;
513- if ( mapEl . _debug ) {
513+ if ( this . _debug ) {
514514 this . _debug . remove ( ) ;
515515 this . _debug = undefined ;
516516 } else {
You can’t perform that action at this time.
0 commit comments