Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Commit 2be05f2

Browse files
authored
Merge pull request #305 from UnityTech/modify_page_view
Modify page view a bit for implementation of swiper.
2 parents 9a3788f + 06a7787 commit 2be05f2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Runtime/widgets/page_view.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public PageController(
3030
public readonly float viewportFraction;
3131

3232

33-
public float page {
33+
public virtual float page {
3434
get {
3535
D.assert(this.positions.isNotEmpty(),
3636
() => "PageController.page cannot be accessed before a PageView is built with it."

Runtime/widgets/scroll_position.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ public float maxScrollExtent {
6161

6262
float? _maxScrollExtent;
6363

64+
public bool hasMinScrollExtent {
65+
get { return this._minScrollExtent != null; }
66+
}
67+
68+
public bool hasMaxScrollExtent {
69+
get { return this._maxScrollExtent != null; }
70+
}
71+
6472
public override float pixels {
6573
get {
6674
D.assert(this._pixels != null);

0 commit comments

Comments
 (0)