You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2020/11/23 04:53:57 UTC
[royale-asjs] 02/02: Scroller measures viewport. Should fix #944
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 490f032f326abd049decccdffdd6fb1d6adf8743
Author: Alex Harui <ah...@apache.org>
AuthorDate: Sun Nov 22 20:53:11 2020 -0800
Scroller measures viewport. Should fix #944
---
.../src/main/royale/spark/components/Scroller.as | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Scroller.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Scroller.as
index a88f3f8..3330ecd 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Scroller.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Scroller.as
@@ -3912,6 +3912,22 @@ public class Scroller extends SkinnableComponent
if (vp.isHeightSizedToContent())
vp.setHeight(height);
}
+
+ override public function get measuredWidth():Number
+ {
+ var vp:UIComponent = _viewport as UIComponent;
+ if (vp)
+ return vp.measuredWidth;
+ return super.measuredWidth;
+ }
+
+ override public function get measuredHeight():Number
+ {
+ var vp:UIComponent = _viewport as UIComponent;
+ if (vp)
+ return vp.measuredHeight;
+ return super.measuredHeight;
+ }
}
}