Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private renderSlider(): void {
if (!this.slider) {
this.container = this.canvas.addGroup();
this.slider = new Slider(this.getSliderConfig());
this.slider.on('sliderchange', this.onChangeFn);
this.container.add(this.slider);
} else {
this.slider.update(this.getSliderConfig());
}
}
public render(): void {
if (!this.container) {
this.container = this.getCanvasController().canvas.addGroup();
}
if (this.slider) {
this.slider.off('sliderchange', this.onChange);
this.slider.remove(true);
}
this.slider = new Slider(this.getSliderConfig());
this.slider.on('sliderchange', this.onChange);
this.container.add(this.slider);
this.getCanvasController().canvas.draw();
}