mirror of
https://github.com/placeAtlas/atlas.git
synced 2024-11-15 14:33:36 +01:00
Fix regression when seeking with wheel not working
This commit is contained in:
parent
be34ca9b25
commit
3601e1db36
1 changed files with 4 additions and 8 deletions
|
@ -42,14 +42,10 @@ timelineList.children[0].value = defaultPeriod
|
||||||
timelineSlider.addEventListener("input", e => timelineParser(e.target.value))
|
timelineSlider.addEventListener("input", e => timelineParser(e.target.value))
|
||||||
|
|
||||||
timelineSlider.addEventListener("wheel", e => {
|
timelineSlider.addEventListener("wheel", e => {
|
||||||
if (e.deltaY < 0) {
|
if (e.deltaY < 0) e.target.valueAsNumber += 1
|
||||||
this.valueAsNumber += 1;
|
else e.target.value -= 1
|
||||||
timelineParser(this.value)
|
timelineParser(e.target.value)
|
||||||
} else {
|
e.stopPropagation()
|
||||||
this.value -= 1;
|
|
||||||
timelineParser(this.value)
|
|
||||||
}
|
|
||||||
e.stopPropagation();
|
|
||||||
}, { passive: true })
|
}, { passive: true })
|
||||||
|
|
||||||
function timelineParser(value) {
|
function timelineParser(value) {
|
||||||
|
|
Loading…
Reference in a new issue