@ -52,14 +52,15 @@ export class LeafletMarker extends withProps(HTMLElement, PROPS) {
if ( ! this . # obj || this . # syncing ) return ;
if ( ! this . # obj || this . # syncing ) return ;
if ( name === 'lat' || name === 'lng' ) {
if ( name === 'lat' || name === 'lng' ) {
this . # obj . setLatLng ( [ this . # num ( 'lat' ) , this . # num ( 'lng' ) ] ) ;
this . # obj . setLatLng ( [ this . # num ( 'lat' ) , this . # num ( 'lng' ) ] ) ;
} else if ( name === 'draggable' ) {
if ( val !== null ) this . # obj . dragging ? . enable ( ) ;
else this . # obj . dragging ? . disable ( ) ;
} else {
} else {
const propName = PROP_BY_ATTR . get ( name ) ;
const propName = PROP_BY_ATTR . get ( name ) ;
if ( ! propName ) return ;
if ( ! propName ) return ;
const setter = ` set ${ propName . charAt ( 0 ) . toUpperCase ( ) } ${ propName . slice ( 1 ) } ` as keyof Marker ;
const setter = ` set ${ propName . charAt ( 0 ) . toUpperCase ( ) } ${ propName . slice ( 1 ) } ` as keyof Marker ;
if ( typeof this . # obj [ setter ] === 'function' ) {
if ( typeof this . # obj [ setter ] === 'function' ) {
const spec = PROPS [ propName as keyof typeof PROPS ] ;
( this . # obj [ setter ] as ( v : unknown ) = > void ) ( parseAttributeValue ( val ) ) ;
const value = spec . kind === 'bool-on' ? val !== null : parseAttributeValue ( val ) ;
( this . # obj [ setter ] as ( v : unknown ) = > void ) ( value ) ;
}
}
}
}
}
}