Added OverflowViewport for containers which require visible overflow.
Changed default ScrollingViewport to the standard Viewport.
We might want to make it simply “Viewport”. Right now, both 
ScrollingViewport and Viewport point to the same thing.


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/637cb437
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/637cb437
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/637cb437

Branch: refs/heads/feature/strand-work
Commit: 637cb4376541f2c2e946769e49259507364e0529
Parents: 8ce67e2
Author: Harbs <ha...@in-tools.com>
Authored: Wed Aug 2 00:24:44 2017 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Wed Aug 2 00:24:44 2017 +0300

----------------------------------------------------------------------
 .../html/supportClasses/OverflowViewport.as     | 129 +++++++++++++++++++
 .../Basic/src/main/resources/basic-manifest.xml |   4 +-
 2 files changed, 132 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/637cb437/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/OverflowViewport.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/OverflowViewport.as
 
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/OverflowViewport.as
new file mode 100644
index 0000000..c123e96
--- /dev/null
+++ 
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/OverflowViewport.as
@@ -0,0 +1,129 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.apache.flex.html.supportClasses
+{
+       import org.apache.flex.core.IBead;
+       import org.apache.flex.core.IContentView;
+       import org.apache.flex.core.IParentIUIBase;
+       import org.apache.flex.core.IStrand;
+       import org.apache.flex.core.IUIBase;
+       import org.apache.flex.core.IViewport;
+       import org.apache.flex.core.IViewportModel;
+       import org.apache.flex.core.UIBase;
+    import org.apache.flex.core.ValuesManager;
+       import org.apache.flex.events.Event;
+    import org.apache.flex.geom.Rectangle;
+    import org.apache.flex.geom.Size;
+       import org.apache.flex.html.beads.models.ScrollBarModel;
+    import org.apache.flex.utils.CSSContainerUtils;
+       COMPILE::SWF
+       {
+               import flash.geom.Rectangle;
+       }
+
+    /**
+     * A OverflowViewport is the area of a Container set aside for displaying
+     * content. If the content exceeds the visible area of the viewport
+        * it will show.
+        *
+        *  @langversion 3.0
+        *  @playerversion Flash 10.2
+        *  @playerversion AIR 2.6
+        *  @productversion FlexJS 0.0
+     */
+       public class OverflowViewport implements IBead, IViewport
+       {
+               /**
+                * Constructor
+            *
+            *  @langversion 3.0
+            *  @playerversion Flash 10.2
+            *  @playerversion AIR 2.6
+            *  @productversion FlexJS 0.0
+                */
+               public function OverflowViewport()
+               {
+               }
+
+               /**
+                * Get the actual parent of the container's content.
+            *
+            *  @langversion 3.0
+            *  @playerversion Flash 10.2
+            *  @playerversion AIR 2.6
+            *  @productversion FlexJS 0.0
+                * @flexjsignorecoercion org.apache.flex.core.IUIBase
+                */
+        public function get contentView():IUIBase
+        {
+            return _strand as IUIBase;
+        }
+
+               protected var _strand:IStrand;
+
+               /**
+                * @flexjsignorecoercion org.apache.flex.core.IUIBase
+                */
+               public function set strand(value:IStrand):void
+               {
+                       _strand = value;
+                       COMPILE::JS
+                       {
+                               (_strand as IUIBase).element.style.overflow = 
"visible";
+                       }
+               }
+
+        /**
+         * @copy org.apache.flex.core.IViewport#setPosition()
+            *
+            *  @langversion 3.0
+            *  @playerversion Flash 10.2
+            *  @playerversion AIR 2.6
+            *  @productversion FlexJS 0.0
+         */
+        public function setPosition(x:Number, y:Number):void
+        {
+        }
+
+        /**
+         * @copy 
org.apache.flex.core.IViewport#layoutViewportBeforeContentLayout()
+            *
+            *  @langversion 3.0
+            *  @playerversion Flash 10.2
+            *  @playerversion AIR 2.6
+            *  @productversion FlexJS 0.0
+         */
+               public function layoutViewportBeforeContentLayout(width:Number, 
height:Number):void
+               {
+               }
+
+        /**
+         * @copy 
org.apache.flex.core.IViewport#layoutViewportAfterContentLayout()
+            *
+            *  @langversion 3.0
+            *  @playerversion Flash 10.2
+            *  @playerversion AIR 2.6
+            *  @productversion FlexJS 0.0
+         */
+               public function 
layoutViewportAfterContentLayout(contentSize:Size):void
+               {
+               }
+
+       }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/637cb437/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml 
b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
index b391ee0..43206f7 100644
--- a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
@@ -120,7 +120,9 @@
      <component id="ImageAndTextButtonView" 
class="org.apache.flex.html.beads.ImageAndTextButtonView" />
      -->
     <component id="ScrollingViewport" 
class="org.apache.flex.html.supportClasses.ScrollingViewport" />
-    <component id="ClippingViewport" 
class="org.apache.flex.html.supportClasses.ClippingViewport" />
+    <component id="ClippingViewport" 
class="org.apache.flex.html.supportClasses.Viewport" />
+    <component id="Viewport" 
class="org.apache.flex.html.supportClasses.Viewport" />
+    <component id="OverflowViewport" 
class="org.apache.flex.html.supportClasses.OverflowViewport" />
 
     <component id="ArraySelectionModel" 
class="org.apache.flex.html.beads.models.ArraySelectionModel" />
     <component id="ArrayListSelectionModel" 
class="org.apache.flex.html.beads.models.ArrayListSelectionModel" />

Reply via email to