added color style property
This commit is contained in:
parent
d12df1d637
commit
886a244520
1 changed files with 2 additions and 0 deletions
|
@ -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`;
|
||||
|
|
Loading…
Reference in a new issue