Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Perlkonig committed Dec 12, 2024
2 parents ed4e64f + 997bf7a commit b526432
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
12 changes: 9 additions & 3 deletions src/renderers/_base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export abstract class RendererBase {
*/
constructor() {
this.options = {
sheets: ["core", "dice", "looney", "piecepack", "chess", "streetcar", "nato"],
sheets: ["core", "dice", "looney", "piecepack", "chess", "streetcar", "nato", "decktet"],
colourContext: {
background: "#fff",
fill: "#000",
Expand Down Expand Up @@ -6123,7 +6123,10 @@ export abstract class RendererBase {
if (this.json.board !== null && this.json.board !== undefined && "strokeWeight" in this.json.board && this.json.board.strokeWeight !== undefined) {
strokeWeight = this.json.board.strokeWeight;
}
let dasharray = (4 * Math.ceil(strokeWeight / (this.cellsize * 0.05))).toString();
let dasharray: string|undefined;
if (note.style !== "solid") {
dasharray = (4 * Math.ceil(strokeWeight / (this.cellsize * 0.05))).toString();
}
if (note.dashed !== undefined && note.dashed !== null) {
dasharray = (note.dashed ).join(" ");
}
Expand Down Expand Up @@ -6239,7 +6242,10 @@ export abstract class RendererBase {
if (this.json.board !== null && this.json.board !== undefined && "strokeWeight" in this.json.board && this.json.board.strokeWeight !== undefined) {
strokeWeight = this.json.board.strokeWeight;
}
let dasharray = (4 * Math.ceil(strokeWeight / (this.cellsize * 0.05))).toString();
let dasharray: string|undefined;
if (note.style !== "solid") {
dasharray = (4 * Math.ceil(strokeWeight / (this.cellsize * 0.05))).toString();
}
if (note.dashed !== undefined && note.dashed !== null) {
dasharray = (note.dashed ).join(" ");
}
Expand Down
3 changes: 1 addition & 2 deletions src/schemas/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,7 @@
"enum": [
"solid",
"dashed"
],
"default": "solid"
]
},
"strokeWidth": {
"description": "The width of the line, expressed as a percentage of cell size.",
Expand Down

0 comments on commit b526432

Please sign in to comment.