royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [royale-asjs] 14/16: try rerunning layout on invalidateSize. Might result in too many calls and we'll need to queue them
Date Wed, 10 Oct 2018 19:34:26 GMT
This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 3879e66027ce56a939aa03b76751323e5e9d5d91
Author: Alex Harui <aharui@apache.org>
AuthorDate: Wed Oct 10 12:05:15 2018 -0700

    try rerunning layout on invalidateSize.  Might result in too many calls and we'll need
to queue them
---
 frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
index 9d85955..b4a4f3a 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
@@ -64,6 +64,7 @@ import org.apache.royale.core.UIBase;
 import org.apache.royale.core.ValuesManager;
 import org.apache.royale.effects.IEffect;
 import org.apache.royale.events.Event;
+import org.apache.royale.events.IEventDispatcher;
 import org.apache.royale.events.KeyboardEvent;
 import org.apache.royale.events.MouseEvent;
 import org.apache.royale.events.ValueChangeEvent;
@@ -3380,10 +3381,13 @@ COMPILE::JS
      *  @playerversion Flash 9
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
+     * 
+     *  @royaleignorecoercion org.apache.royale.events.IEventDispatcher
      */
     public function invalidateSize():void
     {
-        trace("invalidateSize not implemented");
+        if (parent)
+            (parent as IEventDispatcher).dispatchEvent(new Event("layoutNeeded")); // might
cause too many layouts
     }
 
     /**


Mime
View raw message