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 21c635bfef Don't use a JS bead in SWF build
21c635bfef is described below

commit 21c635bfef8eecf6e9f60249f46a923b0158f1e4
Author: Yishay Weiss <[email protected]>
AuthorDate: Tue May 31 09:52:31 2022 +0300

    Don't use a JS bead in SWF build
---
 .../MXRoyale/src/main/royale/mx/controls/Label.as         | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Label.as 
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Label.as
index 7ea5835277..40217b8eb1 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Label.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Label.as
@@ -37,7 +37,10 @@ import mx.core.UIComponent;
 import mx.events.FlexEvent;
 import mx.core.IUITextField;
 import org.apache.royale.html.beads.ReversibleEllipsisOverflow;
-import org.apache.royale.html.beads.OverflowTooltipNeeded;
+COMPILE::JS
+{
+    import org.apache.royale.html.beads.OverflowTooltipNeeded;
+}
 
 /*
 import mx.core.UITextField;
@@ -920,11 +923,14 @@ public class Label extends UIComponent
         {
             _truncationBead = new ReversibleEllipsisOverflow();
             addBead(_truncationBead);
-            if (!toolTip) // if no tooltip is given we will need to detect 
truncation and display one
+            COMPILE::JS
             {
-                addBead(new OverflowTooltipNeeded());
+                if (!toolTip) // if no tooltip is given we will need to detect 
truncation and display one
+                {
+                    addBead(new OverflowTooltipNeeded());
+                }
+                addEventListener(OverflowTooltipNeeded.TOOL_TIP_NEEDED, 
tooltipNeededListener);
             }
-            addEventListener(OverflowTooltipNeeded.TOOL_TIP_NEEDED, 
tooltipNeededListener);
         } else if (_truncationBead && _truncateToFit && !value)
         {
             _truncationBead.revert();
@@ -935,6 +941,7 @@ public class Label extends UIComponent
         _truncateToFit = value;
     }
     
+    COMPILE::JS
     private function tooltipNeededListener(event:ValueEvent):void
     {
         toolTip = event.value ? text : "";

Reply via email to