Scrollbars can be dragged
This commit is contained in:
parent
15d7031e22
commit
c9e556f47b
30
scrollbar.go
30
scrollbar.go
@ -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
|
||||||