ScrollContainer does not scroll child in a forbidden direction
This commit is contained in:
parent
d9bddce20b
commit
dcc672e2bc
@ -152,6 +152,9 @@ func (element *ScrollContainer) HandleScroll (
|
|||||||
x, y int,
|
x, y int,
|
||||||
deltaX, deltaY float64,
|
deltaX, deltaY float64,
|
||||||
) {
|
) {
|
||||||
|
horizontal, vertical := element.child.ScrollAxes()
|
||||||
|
if !horizontal { deltaX = 0 }
|
||||||
|
if !vertical { deltaY = 0 }
|
||||||
element.scrollChildBy(int(deltaX), int(deltaY))
|
element.scrollChildBy(int(deltaX), int(deltaY))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user