Skip to content

Commit

Permalink
Add API to select and reveal a time-graph row by index
Browse files Browse the repository at this point in the history
Signed-off-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
  • Loading branch information
bhufmann committed Jun 13, 2022
1 parent 47c8e30 commit a804e00
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions timeline-chart/src/layer/time-graph-chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,13 @@ export class TimeGraphChart extends TimeGraphChartLayer {
this.isNavigating = flag;
}

selectAndReveal(rowIndex: number) {
if (rowIndex >= 0 && rowIndex < this.rowIds.length) {
this.rowController.selectedRowIndex = rowIndex;
this.navigate(rowIndex);
}
}

protected selectStateInNavigation() {
const row = this.rowController.selectedRow;
if (row && this.unitController.selectionRange) {
Expand Down

0 comments on commit a804e00

Please sign in to comment.