Skip to content

Commit

Permalink
Apply opacity to state label
Browse files Browse the repository at this point in the history
If state has opacity apply it to the font color as well

Signed-off-by: hriday-panchasara <hriday.panchasara@ericsson.com>
  • Loading branch information
hriday-panchasara authored and bhufmann committed Nov 23, 2022
1 parent 9984989 commit ce52382
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions timeline-chart/src/components/time-graph-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,13 @@ export class TimeGraphStateComponent extends TimeGraphComponent<TimelineChart.Ti
if (displayLabel === this.model.label) {
textObj.x = textObjX;
textObj.y = textObjY;
textObj.alpha = this._options.opacity ?? 1;
this.displayObject.addChild(textObj);
} else {
const newTextObj = new PIXI.BitmapText(displayLabel, { fontName: fontName });
newTextObj.x = textObjX;
newTextObj.y = textObjY;
newTextObj.alpha = this._options.opacity ?? 1;
this.displayObject.addChild(newTextObj);
}
}
Expand Down

0 comments on commit ce52382

Please sign in to comment.