Skip to content

Commit

Permalink
Remove zooming selection display object when fetching new data.
Browse files Browse the repository at this point in the history
To remove the zooming selection layer from the timeline chart, it is
necessary to 1) remove the zooming selection object from the graph, and
2) delete the zooming selection object to reset it. Currently, when
fetching new data, the code only performs step 2), but not 1). This leads
to an issue where the zooming selection layer is not removed when users
select a new zooming selection after zooming out. This commit adds
step 1) so that when new data is fetched, the zooming selection is
drawn and removed properly.

Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca>
  • Loading branch information
hoangphamEclipse committed Nov 30, 2022
1 parent ce52382 commit 80468ed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions timeline-chart/src/layer/time-graph-chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,10 @@ export class TimeGraphChart extends TimeGraphChartLayer {
this.selectStateInNavigation();
}
if (this.mouseZooming) {
if (this.zoomingSelection) {
this.removeChild(this.zoomingSelection);
}

delete this.zoomingSelection;
this.updateZoomingSelection();
}
Expand Down

0 comments on commit 80468ed

Please sign in to comment.