Skip to content

Commit

Permalink
Make TimeGraphRow background and gridline spawn full chart width
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Tasse <patrick.tasse@ericsson.com>
  • Loading branch information
PatrickTasse committed Jan 27, 2021
1 parent 8922414 commit 055da10
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions timeline-chart/src/layer/time-graph-chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,10 @@ export class TimeGraphChart extends TimeGraphChartLayer {
const opts: TimeGraphRect = {
height: this.rowController.rowHeight,
position: {
x: this.getPixels(row.range.start - this.unitController.viewRange.start),
x: 0,
y: comp.position.y
},
width: this.getPixels(row.range.end) - this.getPixels(row.range.start)
width: this.stateController.canvasDisplayWidth
}
comp.update(opts);
}
Expand Down Expand Up @@ -275,10 +275,10 @@ export class TimeGraphChart extends TimeGraphChartLayer {
const rowStyle = this.providers.rowStyleProvider ? this.providers.rowStyleProvider(row) : undefined;
const rowComponent = new TimeGraphRow(rowId, {
position: {
x: this.getPixels(row.range.start),
x: 0,
y: (height * rowIndex)
},
width: this.getPixels(row.range.end) - this.getPixels(row.range.start),
width: this.stateController.canvasDisplayWidth,
height
}, rowIndex, row, rowStyle);
rowComponent.displayObject.interactive = true;
Expand Down

0 comments on commit 055da10

Please sign in to comment.