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 da5e8c2  SparkRoyale: Add bead 
SparkSkinWithClipAndEnableScrollinvViewport to respect property 
clipAndEnableScrolling
da5e8c2 is described below

commit da5e8c2c1debd0ddb47fbbaea7c2fcc4e260cfae
Author: Piotr Zarzycki <[email protected]>
AuthorDate: Fri Nov 27 13:06:40 2020 +0100

    SparkRoyale: Add bead SparkSkinWithClipAndEnableScrollinvViewport to 
respect property clipAndEnableScrolling
---
 .../src/main/resources/spark-royale-manifest.xml   |  1 +
 .../src/main/royale/SparkRoyaleClasses.as          |  1 +
 .../SparkSkinWithClipAndEnableScrollingViewport.as | 69 ++++++++++++++++++++++
 .../spark/components/supportClasses/GroupBase.as   |  2 +-
 4 files changed, 72 insertions(+), 1 deletion(-)

diff --git 
a/frameworks/projects/SparkRoyale/src/main/resources/spark-royale-manifest.xml 
b/frameworks/projects/SparkRoyale/src/main/resources/spark-royale-manifest.xml
index c7ca5bb..31d3ede 100644
--- 
a/frameworks/projects/SparkRoyale/src/main/resources/spark-royale-manifest.xml
+++ 
b/frameworks/projects/SparkRoyale/src/main/resources/spark-royale-manifest.xml
@@ -35,6 +35,7 @@
        <component id="Panel" class="spark.components.Panel" />
        <component id="TitleWindow" class="spark.components.TitleWindow" />
        <component id="SparkSkin" class="spark.skins.SparkSkin"/>
+       <component id="SparkSkinWithClipAndEnableScrollingViewport" 
class="spark.components.beads.SparkSkinWithClipAndEnableScrollingViewport"/>
        <component id="Path" class="spark.primitives.Path"/>
        <component id="Rect" class="spark.primitives.Rect"/>
        <component id="Line" class="spark.primitives.Line"/>
diff --git 
a/frameworks/projects/SparkRoyale/src/main/royale/SparkRoyaleClasses.as 
b/frameworks/projects/SparkRoyale/src/main/royale/SparkRoyaleClasses.as
index ca38116..59bbdba 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/SparkRoyaleClasses.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/SparkRoyaleClasses.as
@@ -93,6 +93,7 @@ internal class SparkRoyaleClasses
     import spark.components.beads.GroupView; GroupView;
     import spark.components.beads.SkinnableContainerView; 
SkinnableContainerView;
     import spark.components.beads.SparkSkinScrollingViewport; 
SparkSkinScrollingViewport;
+       import 
spark.components.beads.SparkSkinWithClipAndEnableScrollingViewport; 
SparkSkinWithClipAndEnableScrollingViewport;
     import spark.components.beads.DropDownListView; DropDownListView;
     import spark.components.beads.TitleWindowView; TitleWindowView;
     import spark.components.beads.controllers.DropDownListController; 
DropDownListController;
diff --git 
a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/SparkSkinWithClipAndEnableScrollingViewport.as
 
b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/SparkSkinWithClipAndEnableScrollingViewport.as
new file mode 100644
index 0000000..279309b
--- /dev/null
+++ 
b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/beads/SparkSkinWithClipAndEnableScrollingViewport.as
@@ -0,0 +1,69 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package spark.components.beads
+{
+    import spark.core.IViewport;
+
+    /**
+     *  @private
+     *  The viewport that loads a Spark Skin.
+     */
+    public class SparkSkinWithClipAndEnableScrollingViewport extends 
SparkSkinScrollingViewport
+    {
+        
//--------------------------------------------------------------------------
+        //
+        //  Constructor
+        //
+        
//--------------------------------------------------------------------------
+
+        /**
+         *  Constructor.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 3
+         */
+        public function SparkSkinWithClipAndEnableScrollingViewport()
+        {
+            super();
+        }
+
+        /**
+         * Subclasses override this method to change scrolling behavior
+         */
+        COMPILE::JS
+        override protected function setScrollStyle():void
+        {
+            var viewPort:IViewport = contentArea as IViewport;
+            if (viewPort != null)
+            {
+                //Make sure that initial state of clipAndEnableScrolling is 
preserved
+                if (!viewPort.clipAndEnableScrolling)
+                {
+                    contentArea.element.style.overflow = "visible";
+                    return;
+                }
+            }
+
+            contentArea.element.style.overflow = "auto";
+        }
+    }
+}
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 3ce13ff..5ea467c 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
@@ -759,7 +759,7 @@ public class GroupBase extends UIComponent implements 
ILayoutParent, IContainer,
     //  clipAndEnableScrolling
     //----------------------------------
 
-    private var _clipAndEnableScrolling:Boolean = true;
+    private var _clipAndEnableScrolling:Boolean = false;
     
     /**
      *  @copy spark.core.IViewport#clipAndEnableScrolling

Reply via email to