Skip to content

Commit

Permalink
feat: ✨ add event cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideSegullo committed May 30, 2024
1 parent a2d36fc commit f977a25
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ export abstract class ChartController<T = TimeChartOptions, K = Time> {
}

remove() {
this.api.unsubscribeCrosshairMove((param) => {
this.onCrosshairMove?.(param as never);
this.events.emit("crosshairMove", param as never);
});
this.api.remove();
this.events.emit("remove", this.params);
}
Expand Down

0 comments on commit f977a25

Please sign in to comment.