From 886a2445204ab0c473386d3c998a75113960498d Mon Sep 17 00:00:00 2001 From: PMKuipers Date: Mon, 17 Jul 2023 20:20:25 +0200 Subject: [PATCH] added color style property --- amd/src/simpleline.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/amd/src/simpleline.js b/amd/src/simpleline.js index 0ab95ca..6836062 100644 --- a/amd/src/simpleline.js +++ b/amd/src/simpleline.js @@ -141,6 +141,7 @@ export class SimpleLine { this.specs = { autorefresh: 10, class: "", + color: "", // invalid propery makes it inherit from parent containers anchors: { // top, middle, bottom // left, center, right @@ -364,6 +365,7 @@ export class SimpleLine { this.svg.setAttribute("viewBox",`0 0 ${bounds.w}, ${bounds.h}`); this.svg.setAttribute("width",`${bounds.w}px`); this.svg.setAttribute("height",`${bounds.h}px`); + this.svg.style.color = this.specs.color; // Reposition the SVG relative to the container this.svg.style.left = `${bounds.x}px`;