[view] fix ScrollView position
This commit is contained in:
@@ -58,6 +58,7 @@ class ScrollView extends HGroupView {
|
|||||||
|
|
||||||
private function set_position(value:Float):Float {
|
private function set_position(value:Float):Float {
|
||||||
position = Math.min(Math.max(0, value), 1 - (height / view.height));
|
position = Math.min(Math.max(0, value), 1 - (height / view.height));
|
||||||
|
if (height / view.height > 1) position = 0;
|
||||||
if (scroll != null) {
|
if (scroll != null) {
|
||||||
scroll.position = position;
|
scroll.position = position;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user