DocumentContainer constrains its scroll position on resize
This commit is contained in:
parent
b7a7800370
commit
5afbc0e713
@ -187,6 +187,12 @@ func (element *DocumentContainer) redoAll () {
|
|||||||
// do a layout
|
// do a layout
|
||||||
element.doLayout()
|
element.doLayout()
|
||||||
|
|
||||||
|
maxScrollHeight := element.maxScrollHeight()
|
||||||
|
if element.scroll.Y > maxScrollHeight {
|
||||||
|
element.scroll.Y = maxScrollHeight
|
||||||
|
element.doLayout()
|
||||||
|
}
|
||||||
|
|
||||||
// draw a background
|
// draw a background
|
||||||
rocks := make([]image.Rectangle, len(element.children))
|
rocks := make([]image.Rectangle, len(element.children))
|
||||||
for index, entry := range element.children {
|
for index, entry := range element.children {
|
||||||
|
Reference in New Issue
Block a user