Skip to content

Commit 34b2fc2

Browse files
committed
IconOptions to accept arrays and point objects
All Leaflet methods and options that accept Point objects also accept them in a simple Array form (unless noted otherwise), so these lines are equivalent: http://leafletjs.com/reference.html#point
1 parent 62eedc3 commit 34b2fc2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

leaflet/leaflet.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,15 +1088,15 @@ declare namespace L {
10881088
/**
10891089
* Size of the icon image in pixels.
10901090
*/
1091-
iconSize?: Point;
1091+
iconSize?: Point|number[];
10921092

10931093
/**
10941094
* The coordinates of the "tip" of the icon (relative to its top left corner).
10951095
* The icon will be aligned so that this point is at the marker's geographical
10961096
* location. Centered by default if size is specified, also can be set in CSS
10971097
* with negative margins.
10981098
*/
1099-
iconAnchor?: Point;
1099+
iconAnchor?: Point|number[];
11001100

11011101
/**
11021102
* The URL to the icon shadow image. If not specified, no shadow image will be
@@ -1113,19 +1113,19 @@ declare namespace L {
11131113
/**
11141114
* Size of the shadow image in pixels.
11151115
*/
1116-
shadowSize?: Point;
1116+
shadowSize?: Point|number[];
11171117

11181118
/**
11191119
* The coordinates of the "tip" of the shadow (relative to its top left corner)
11201120
* (the same as iconAnchor if not specified).
11211121
*/
1122-
shadowAnchor?: Point;
1122+
shadowAnchor?: Point|number[];
11231123

11241124
/**
11251125
* The coordinates of the point from which popups will "open", relative to the
11261126
* icon anchor.
11271127
*/
1128-
popupAnchor?: Point;
1128+
popupAnchor?: Point|number[];
11291129

11301130
/**
11311131
* A custom class name to assign to both icon and shadow images. Empty by default.

0 commit comments

Comments
 (0)