[view] fix ScrollView position

This commit is contained in:
2019-06-13 21:41:25 +03:00
parent 400d91ef6e
commit 735e4c1444

View File

@@ -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;
} }