mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 04:01:52 +00:00
Exposed _shadow property in Leaflet.Marker class (#42788)
This commit is contained in:
Vendored
+2
@@ -1906,6 +1906,8 @@ export class Marker<P = any> extends Layer {
|
||||
options: MarkerOptions;
|
||||
dragging?: Handler;
|
||||
feature?: geojson.Feature<geojson.Point, P>;
|
||||
|
||||
protected _shadow: HTMLElement | undefined;
|
||||
}
|
||||
|
||||
export function marker(latlng: LatLngExpression, options?: MarkerOptions): Marker;
|
||||
|
||||
@@ -502,6 +502,16 @@ class MyMarker extends L.Marker {
|
||||
constructor() {
|
||||
super([12, 13]);
|
||||
}
|
||||
|
||||
// adapted from Leaflet.AnimatedMarker
|
||||
animate() {
|
||||
const speed = 1000;
|
||||
|
||||
if (L.DomUtil.TRANSITION) {
|
||||
if (this.getElement()) { this.getElement().style.setProperty(L.DomUtil.TRANSITION, `all ${speed}ms linear`); }
|
||||
if (this._shadow) { this._shadow.style.setProperty(L.DomUtil.TRANSITION, `all ${speed}ms linear`); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class MyLayer extends L.Layer {
|
||||
|
||||
Reference in New Issue
Block a user