Scrollbars can be dragged

This commit is contained in:
Sasha Koshka 2023-09-14 21:40:06 -04:00
parent 15d7031e22
commit c9e556f47b
2 changed files with 27 additions and 15 deletions

View File

@ -67,6 +67,7 @@ func (this *Scrollbar) Link (box tomo.ContentBox) event.Cookie {
func (this *Scrollbar) handleLinkedContentBoundsChange () { func (this *Scrollbar) handleLinkedContentBoundsChange () {
if this.layout.linked == nil { return } if this.layout.linked == nil { return }
previousValue := this.layout.value
trackLength := this.layout.contentLength() - this.layout.viewportLength() trackLength := this.layout.contentLength() - this.layout.viewportLength()
if trackLength == 0 { if trackLength == 0 {
this.layout.value = 0 this.layout.value = 0