Skip to content

Commit

Permalink
Timeline chart: Fixed bug in selectRowElement
Browse files Browse the repository at this point in the history
Fixed regression

Signed-off-by: Soukaina Moussaoui <soukaina.moussaoui@polymtl.ca>
  • Loading branch information
smouss authored and MatthewKhouzam committed Aug 20, 2020
1 parent a84f45e commit 35a4f32
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions timeline-chart/src/layer/time-graph-chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,20 +347,14 @@ export class TimeGraphChart extends TimeGraphChartLayer {
this.updateElementStyle(this.selectedElementModel);
}
if (model) {
this.selectedElementModel = model;
model.selected = true;
this.updateElementStyle(this.selectedElementModel);
const el = this.getElementById(model.id);
if (el) {
const row = el.row;
if (row) {
const newEl = this.createNewRowElement(model, row);
if (newEl) {
this.removeChild(el);
this.addElementInteractions(newEl);
this.addChild(newEl);
this.selectRow(newEl.row.model);
}
this.selectedElementModel = el.model;
el.model.selected = true;
this.updateElementStyle(this.selectedElementModel);
this.selectRow(row.model);
}
}
}
Expand Down

0 comments on commit 35a4f32

Please sign in to comment.