Skip to content

Commit df6a7a8

Browse files
committed
Merge branch 'develop'
2 parents e80a39d + 449dff3 commit df6a7a8

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

src/renderers/_base.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6683,7 +6683,11 @@ export abstract class RendererBase {
66836683
linecap: "round", linejoin: "round"
66846684
};
66856685
if ( ("style" in marker) && (marker.style !== undefined) && (marker.style === "dashed") ) {
6686-
stroke.dasharray = "4";
6686+
if ( ("dasharray" in marker) && (marker.dasharray !== undefined) && (Array.isArray(marker.dasharray)) ) {
6687+
stroke.dasharray = marker.dasharray.join(" ");
6688+
} else {
6689+
stroke.dasharray = "4";
6690+
}
66876691
}
66886692
let centered = false;
66896693
if ( "centered" in marker && marker.centered !== undefined && marker.centered) {

src/schemas/schema.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,10 @@ export interface MarkerLine {
656656
*/
657657
width?: number;
658658
style?: "solid" | "dashed";
659+
/**
660+
* A valid `dasharray` appropriate for the game's display.
661+
*/
662+
dasharray?: number[];
659663
/**
660664
* By default, on boards like `squares*`, lines anchor to the top-left corner of the cell. If `centered` is true, it will instead anchor to the centre point of the cell.
661665
*/

src/schemas/schema.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,6 +1259,13 @@
12591259
],
12601260
"default": "solid"
12611261
},
1262+
"dasharray": {
1263+
"description": "A valid `dasharray` appropriate for the game's display.",
1264+
"type": "array",
1265+
"items": {
1266+
"type": "number"
1267+
}
1268+
},
12621269
"centered": {
12631270
"description": "By default, on boards like `squares*`, lines anchor to the top-left corner of the cell. If `centered` is true, it will instead anchor to the centre point of the cell.",
12641271
"type": "boolean",

0 commit comments

Comments
 (0)