From e281538309fbda99f472337efde50c8245f8937d Mon Sep 17 00:00:00 2001 From: Tim Deubler Date: Mon, 6 Nov 2023 17:36:56 +0100 Subject: [PATCH] type fix Signed-off-by: Tim Deubler --- packages/core/src/styles/GenericStyle.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/core/src/styles/GenericStyle.ts b/packages/core/src/styles/GenericStyle.ts index d8a57627e..a8156d866 100644 --- a/packages/core/src/styles/GenericStyle.ts +++ b/packages/core/src/styles/GenericStyle.ts @@ -172,9 +172,20 @@ export interface Style { * The strokeDasharray attribute controls the pattern of dashes and gaps used to stroke paths. * It's an array of that specify the lengths of alternating dashes and gaps. If an odd number of values is provided, * then the list of values is repeated to yield an even number of values. Thus, 5,3,2 is equivalent to 5,3,2,5,3,2. + * The size of dashes and gaps can be defined in pixel or meter. + * The default unit for dash and gap size is pixel. + * To define the size in meters, a string containing the "dash"/"gap" size and ending with "m" must be used. * This attribute is valid for Line styles only. - */ - strokeDasharray?: number[] | StyleValueFunction | StyleZoomRange | 'none'; + * + * @example + * // dash and gap size is defined in pixel. + * strokeDasharray: [20,10] + * // dash and gap size is defined in meter. + * strokeDasharray: ["20m","10m"] + * // dash -> 10 meter, gap -> 10 pixel. + * strokeDasharray: ["20m",10] || ["20m","10px"] + */ + strokeDasharray?: (number|string)[] | StyleValueFunction<(number|string)[]> | StyleZoomRange<(number|string)[]> | 'none'; /** * Defines the opacity of the style.