@ -39,7 +39,7 @@ export class LeafletPolyline extends TypedBase {
connectedCallback() {
connectedCallback() {
this . # obj = new Polyline ( this . # getCoords ( ) , buildOptions ( this , PROPS ) ) ;
this . # obj = new Polyline ( this . # getCoords ( ) , buildOptions ( this , PROPS ) ) ;
this . # childHandler = createChildRegisterHandler ( this . # obj , this . # children ) ;
this . # childHandler = createChildRegisterHandler ( this . # obj , this . # children ) ;
this . addEventListener ( 'leaflet-register' , this . # childHandler as EventListener ) ;
this . addEventListener ( 'leaflet-register' , this . # childHandler ) ;
registerWithParent ( this , this . # obj ) ;
registerWithParent ( this , this . # obj ) ;
this . addEventListener ( 'line-updated' , this . # syncCoords ) ;
this . addEventListener ( 'line-updated' , this . # syncCoords ) ;
@ -51,8 +51,7 @@ export class LeafletPolyline extends TypedBase {
this . # observer ? . disconnect ( ) ;
this . # observer ? . disconnect ( ) ;
this . # observer = undefined ;
this . # observer = undefined ;
this . removeEventListener ( 'line-updated' , this . # syncCoords ) ;
this . removeEventListener ( 'line-updated' , this . # syncCoords ) ;
if ( this . # childHandler )
if ( this . # childHandler ) this . removeEventListener ( 'leaflet-register' , this . # childHandler ) ;
this . removeEventListener ( 'leaflet-register' , this . # childHandler as EventListener ) ;
this . # children . clear ( ) ;
this . # children . clear ( ) ;
this . # obj ? . remove ( ) ;
this . # obj ? . remove ( ) ;
this . # obj = undefined ;
this . # obj = undefined ;