This could be a good topic to put down here…

https://github.com/apache/royale-asjs/wiki/Layout-Challenges


________________________________
From: Yishay Weiss <yishayj...@hotmail.com>
Sent: Sunday, June 3, 2018 1:18:03 PM
To: dev@royale.apache.org
Subject: RE: [royale-asjs] branch develop updated: Fixes #258. But is that a 
proper fix?

I’ve seen several instances where the offsetParent hasn’t been set yet when 
layout is run, which messes things up. I solved this here by running another 
layout at a later time but I’m interested to hear others on how this should be 
solved.

From: yish...@apache.org<mailto:yish...@apache.org>
Sent: Sunday, June 3, 2018 1:12 PM
To: comm...@royale.apache.org<mailto:comm...@royale.apache.org>
Subject: [royale-asjs] branch develop updated: Fixes #258. But is that a proper 
fix?

This is an automated email from the ASF dual-hosted git repository.

yishayw 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 37a3a6d  Fixes #258. But is that a proper fix?
37a3a6d is described below

commit 37a3a6d5a433d97b654b134f4d354214224172b6
Author: DESKTOP-RH4S838\Yishay <yishayj...@hotmail.com>
AuthorDate: Sun Jun 3 13:11:31 2018 +0300

    Fixes #258. But is that a proper fix?
---
 examples/royale/TreeExample/src/main/royale/MyInitialView.mxml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/examples/royale/TreeExample/src/main/royale/MyInitialView.mxml 
b/examples/royale/TreeExample/src/main/royale/MyInitialView.mxml
index 8b70a52..f25bfdf 100644
--- a/examples/royale/TreeExample/src/main/royale/MyInitialView.mxml
+++ b/examples/royale/TreeExample/src/main/royale/MyInitialView.mxml
@@ -39,6 +39,11 @@ limitations under the License.

         <fx:Script>
                 <![CDATA[
+               override public function addedToParent():void
+               {
+                       super.addedToParent();
+                       treeGrid.dispatchEvent(new Event('layoutNeeded'));
+               }
                 ]]>
         </fx:Script>

@@ -56,7 +61,7 @@ limitations under the License.
                 </js:beads>
         </js:Tree>

-       <js:TreeGrid x="450" y="30" width="500" height="500" rowHeight="40">
+       <js:TreeGrid id="treeGrid" x="450" y="30" width="500" height="500" 
rowHeight="40">
                 <js:beads>
                         <js:ConstantBinding
                                 sourceID="applicationModel"

--
To stop receiving notification emails like this one, please contact
yish...@apache.org.

Reply via email to