You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ha...@apache.org on 2019/05/27 07:50:21 UTC
[royale-asjs] branch develop updated: For scrolling the content
area should always be 100%
This is an automated email from the ASF dual-hosted git repository.
harbs 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 cff0c08 For scrolling the content area should always be 100%
new f3e4d91 Merge branch 'develop' of https://github.com/apache/royale-asjs into develop
cff0c08 is described below
commit cff0c08e9b81e363192586bfbecaa7f2b15f3346
Author: Harbs <ha...@in-tools.com>
AuthorDate: Mon May 27 10:49:39 2019 +0300
For scrolling the content area should always be 100%
The content area should be positioned absolute to prevent pushing out other elements such as a drawing layer.
The drawing layer can simply be 100% sized.
---
.../html/supportClasses/ScrollingViewport.as | 32 +++-------------------
.../apache/royale/html/beads/DragDropListView.as | 15 ++--------
2 files changed, 6 insertions(+), 41 deletions(-)
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/ScrollingViewport.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/ScrollingViewport.as
index 03d896a..17bf1b0 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/ScrollingViewport.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/ScrollingViewport.as
@@ -103,43 +103,19 @@ package org.apache.royale.html.supportClasses
/**
* If the contentArea is not the same as the strand,
- * we need to sync the percentage sizes for scrolling to work correctly.
+ * we need to size it to 100% for scrolling to work correctly.
* @royaleignorecoercion org.apache.royale.events.IEventDispatcher
*/
protected function adaptContentArea():void
{
if(_strand != contentArea)
{
- var host:ILayoutChild = _strand as ILayoutChild;
- var val:Number = host.percentHeight;
- if(!isNaN(val)){
- contentArea.percentHeight = val;
- }
- val = host.percentWidth;
- if(!isNaN(val)){
- contentArea.percentWidth = val;
- }
- (_strand as IEventDispatcher).addEventListener("percentWidthChanged",handleWidthChange);
- (_strand as IEventDispatcher).addEventListener("percentHeightChanged",handleHeightChange);
+ contentArea.percentHeight = 100;
+ contentArea.percentWidth = 100;
+ contentArea.element.style.position = "absolute";
}
}
- /**
- * @royaleignorecoercion org.apache.royale.core.ILayoutChild
- */
- private function handleWidthChange(ev:Event):void
- {
- contentArea.percentWidth = (_strand as ILayoutChild).percentWidth;
- }
-
- /**
- * @royaleignorecoercion org.apache.royale.core.ILayoutChild
- */
- private function handleHeightChange(ev:Event):void
- {
- contentArea.percentHeight = (_strand as ILayoutChild).percentHeight;
- }
-
}
COMPILE::SWF
diff --git a/frameworks/projects/DragDrop/src/main/royale/org/apache/royale/html/beads/DragDropListView.as b/frameworks/projects/DragDrop/src/main/royale/org/apache/royale/html/beads/DragDropListView.as
index 59ec2cd..6081111 100644
--- a/frameworks/projects/DragDrop/src/main/royale/org/apache/royale/html/beads/DragDropListView.as
+++ b/frameworks/projects/DragDrop/src/main/royale/org/apache/royale/html/beads/DragDropListView.as
@@ -54,6 +54,8 @@ package org.apache.royale.html.beads
var layerBead:ListDrawingLayerBead = new ListDrawingLayerBead();
_strand.addBead(layerBead);
_layer = layerBead.layer;
+ _layer.percentHeight = 100;
+ _layer.percentWidth = 100;
//var chost:IContainer = host as IContainer;
//chost.strandChildren.addElement(_layer);
@@ -61,19 +63,6 @@ package org.apache.royale.html.beads
}
- /**
- * @private
- * @royaleignorecoercion org.apache.royale.core.UIBase
- */
- override public function afterLayout():void
- {
- super.afterLayout();
-
- _layer.x = 0;
- _layer.y = 0;
- _layer.width = UIBase(_strand).width;
- _layer.height = UIBase(_strand).height;
- }
}
COMPILE::SWF