This is an automated email from the ASF dual-hosted git repository.
piotrz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new 00c5b6c SparkRoyale: Start respecting clipAndEnableScrolling property
provided by skin/IViewPort part of component - clipAndEnableScrolling set
overflow to "unset" instead "none" which is proper value for that property
00c5b6c is described below
commit 00c5b6c687fdf29164f58d4cc66d858bafd07dd5
Author: Piotr Zarzycki <[email protected]>
AuthorDate: Wed Nov 25 19:54:42 2020 +0100
SparkRoyale: Start respecting clipAndEnableScrolling property provided by
skin/IViewPort part of component
- clipAndEnableScrolling set overflow to "unset" instead "none" which is
proper value for that property
---
.../components/beads/SparkSkinScrollingViewport.as | 18 ++++++++++++++++--
.../spark/components/supportClasses/GroupBase.as | 2 +-
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git
a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/SparkSkinScrollingViewport.as
b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/SparkSkinScrollingViewport.as
index 14ac721..6e2d296 100644
---
a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/SparkSkinScrollingViewport.as
+++
b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/SparkSkinScrollingViewport.as
@@ -21,7 +21,10 @@ package spark.components.beads
{
import mx.core.mx_internal;
-use namespace mx_internal;
+
+ import spark.core.IViewport;
+
+ use namespace mx_internal;
import spark.components.supportClasses.GroupBase;
import spark.components.supportClasses.SkinnableComponent;
@@ -83,7 +86,18 @@ public class SparkSkinScrollingViewport extends
SparkSkinViewport implements ISc
COMPILE::JS
protected function setScrollStyle():void
{
- contentArea.element.style.overflow = "auto";
+ var viewPortArea:IViewport = contentArea as IViewport;
+ if (viewPortArea && !viewPortArea.clipAndEnableScrolling)
+ {
+ if (contentArea.element.style.overflow != "unset")
+ {
+ contentArea.element.style.overflow = "unset";
+ }
+ }
+ else
+ {
+ contentArea.element.style.overflow = "auto";
+ }
}
COMPILE::SWF
diff --git
a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/GroupBase.as
b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/GroupBase.as
index 4b7a890..3c36a34 100644
---
a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/GroupBase.as
+++
b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/GroupBase.as
@@ -790,7 +790,7 @@ public class GroupBase extends UIComponent implements
ILayoutParent, IContainer,
{
COMPILE::JS
{
- element.style.overflow = value ? "auto" : "none";
+ element.style.overflow = value ? "auto" : "unset";
}
COMPILE::SWF
{