mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Fixed wrong callback call from slider
This commit is contained in:
parent
493898bd4a
commit
d41dfc1e0d
@ -63,14 +63,12 @@ export class Slider extends Control {
|
||||
|
||||
setValue(newValue: number, ignoreExpectedValue: boolean = true) {
|
||||
if (!this.getDragged() && (ignoreExpectedValue || this.checkExpectedValue(newValue))) {
|
||||
if (this.#value !== newValue) {
|
||||
if (this.#value !== newValue)
|
||||
this.#value = newValue;
|
||||
if (this.#callback)
|
||||
this.#callback(this.getValue());
|
||||
}
|
||||
|
||||
if (this.#slider != null)
|
||||
this.#slider.value = String((newValue - this.#minValue) / (this.#maxValue - this.#minValue) * parseFloat(this.#slider.max));
|
||||
|
||||
this.#update();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user