From 3c53eedee1c408b839e5fb0a4a90dfc44ab45251 Mon Sep 17 00:00:00 2001 From: Dmytro Soldatov Date: Mon, 17 Jun 2024 15:03:11 +0300 Subject: [PATCH] =?UTF-8?q?fix=20=E2=84=96171=20Error=20when=20using=20sli?= =?UTF-8?q?der?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/SliderBase.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/SliderBase.ts b/src/SliderBase.ts index 243cdd34..0c4c1f1b 100644 --- a/src/SliderBase.ts +++ b/src/SliderBase.ts @@ -60,12 +60,20 @@ export class SliderBase extends ProgressBar this.slider1 = options.slider1; this.slider2 = options.slider2; - this.fill.eventMode = 'none'; - this.min = options.min ?? 0; this.max = options.max ?? 100; } + override init(progressBarOptions: ProgressBarOptions) + { + super.init(progressBarOptions); + + if (this.fill) { + this.fill.eventMode = 'none'; + } + } + + /** * Sets Slider1 instance. * @param value - Container or string with texture name.