From a3550f2336df48faae072e2dbde6ff8d8c3ca9fc Mon Sep 17 00:00:00 2001 From: Iisakki Rotko Date: Thu, 11 Apr 2024 19:53:44 +0200 Subject: [PATCH] fix: cast this.get_options to support @types/leaflet@1.9.9 --- python/jupyter_leaflet/src/layers/Circle.ts | 5 ++++- python/jupyter_leaflet/src/layers/CircleMarker.ts | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/python/jupyter_leaflet/src/layers/Circle.ts b/python/jupyter_leaflet/src/layers/Circle.ts index 383fe9c1c..a51edf826 100644 --- a/python/jupyter_leaflet/src/layers/Circle.ts +++ b/python/jupyter_leaflet/src/layers/Circle.ts @@ -22,7 +22,10 @@ export class LeafletCircleView extends LeafletCircleMarkerView { obj: Circle; create_obj() { - this.obj = L.circle(this.model.get('location'), this.get_options()); + this.obj = L.circle( + this.model.get('location'), + this.get_options() as L.CircleOptions + ); } model_events() { diff --git a/python/jupyter_leaflet/src/layers/CircleMarker.ts b/python/jupyter_leaflet/src/layers/CircleMarker.ts index ef02060c2..e3036440a 100644 --- a/python/jupyter_leaflet/src/layers/CircleMarker.ts +++ b/python/jupyter_leaflet/src/layers/CircleMarker.ts @@ -22,7 +22,10 @@ export class LeafletCircleMarkerView extends LeafletPathView { obj: CircleMarker; create_obj() { - this.obj = L.circleMarker(this.model.get('location'), this.get_options()); + this.obj = L.circleMarker( + this.model.get('location'), + this.get_options() as L.CircleMarkerOptions + ); } model_events() {