Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Perlkonig committed Apr 21, 2024
2 parents 9abf5ce + 0a0a7f9 commit cf899da
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/renderers/_base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5019,7 +5019,10 @@ export abstract class RendererBase {
colour = marker.colour as string;
}
}
const opacity = baseOpacity + ((1 - baseOpacity) / 2);
let opacity = baseOpacity + ((1 - baseOpacity) / 2);
if ( ("opacity" in marker) && (marker.opacity !== undefined) ) {
opacity = marker.opacity as number;
}
const style = this.json.board.style;
if ( (style === "vertex") || (style === "vertex-cross") || (style === "go") || (style.startsWith("conhex")) ) {
let xFrom = 0; let yFrom = 0;
Expand Down
1 change: 1 addition & 0 deletions src/schemas/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ export interface APRenderRep {
* The colour of the shaded area. Can be either a number (which will be interpreted as a built-in player colour) or a hexadecimal colour string.
*/
colour: PositiveInteger | Colourstrings;
opacity?: number;
}
| {
/**
Expand Down
6 changes: 6 additions & 0 deletions src/schemas/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,12 @@
{"$ref": "#/definitions/positiveInteger"},
{"$ref": "#/definitions/colourstrings"}
]
},
"opacity": {
"type": "number",
"minimum": 0,
"maximum": 1,
"default": 1
}
},
"required": ["type", "edge", "colour"],
Expand Down

0 comments on commit cf899da

Please sign in to comment.