panel: prevent delayed setScroll call to fail in edge case

This commit is contained in:
jean-emmanuel 2022-02-27 22:15:24 +01:00
parent 1175374341
commit 25f7b3e4aa

View file

@ -296,7 +296,7 @@ class Panel extends Container() {
this.value = v
clearTimeout(this.scrollTimeout)
this.scrollTimeout = setTimeout(()=>{
this.setScroll(v[0] * this.scrollWidth, v[1] * this.scrollHeight)
if (this.scroll) this.setScroll(v[0] * this.scrollWidth, v[1] * this.scrollHeight)
})
if (options.send) this.sendValue()