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
commit 2e412a93dbd2dfeb8b4d7f9d7d02e9356c3e919e Author: Harbs <[email protected]> AuthorDate: Fri Mar 16 10:43:52 2018 +0200 Renamed TextOverflow to be more descriptive Added support so it can be used with Label --- .../Basic/src/main/resources/basic-manifest.xml | 2 +- .../beads/{TextOverflow.as => EllipsisOverflow.as} | 28 +++++++--------------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml index 442fc49..f7bf3ea 100644 --- a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml +++ b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml @@ -135,7 +135,7 @@ <component id="PasswordInputBead" class="org.apache.royale.html.accessories.PasswordInputBead" /> <component id="PasswordInputRemovableBead" class="org.apache.royale.html.accessories.PasswordInputRemovableBead" /> <component id="TextPromptBead" class="org.apache.royale.html.accessories.TextPromptBead" /> - <component id="TextOverflow" class="org.apache.royale.html.beads.TextOverflow" /> + <component id="EllipsisOverflow" class="org.apache.royale.html.beads.EllipsisOverflow" /> <component id="HRule" class="org.apache.royale.html.HRule" /> <component id="VRule" class="org.apache.royale.html.VRule" /> <component id="Spacer" class="org.apache.royale.html.Spacer" /> diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/TextOverflow.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/EllipsisOverflow.as similarity index 77% rename from frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/TextOverflow.as rename to frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/EllipsisOverflow.as index 37839d4..fba40c3 100644 --- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/TextOverflow.as +++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/EllipsisOverflow.as @@ -24,15 +24,15 @@ package org.apache.royale.html.beads import org.apache.royale.core.IUIBase; /** - * The TextOverflow class is a bead that can be used with - * a TextButton control to stop the text from overflowing. + * The EllipsisOverflow class is a bead that can be used + * to stop the text from overflowing and display an ellipsis. * * @langversion 3.0 * @playerversion Flash 10.2 * @playerversion AIR 2.6 * @productversion Royale 0.9 */ - public class TextOverflow implements IBead + public class EllipsisOverflow implements IBead { /** * constructor. @@ -42,7 +42,7 @@ package org.apache.royale.html.beads * @playerversion AIR 2.6 * @productversion Royale 0.9 */ - public function TextOverflow() + public function EllipsisOverflow() { } @@ -55,31 +55,21 @@ package org.apache.royale.html.beads * @playerversion Flash 10.2 * @playerversion AIR 2.6 * @productversion Royale 0.9 + * @royaleignorecoercion org.apache.royale.core.IUIBase */ public function set strand(value:IStrand):void { _strand = value; - updateHost(); - } - - /** - * @royaleignorecoercion org.apache.royale.core.IUIBase - */ - private function get host():IUIBase - { - return _strand as IUIBase; - } - - private function updateHost():void - { COMPILE::SWF { // Nothing to do as by default ellipsis are added } COMPILE::JS { - host.element.style.overflow = "hidden"; - host.element.style.textOverflow = "ellipsis"; + var style:CSSStyleDeclaration = (_strand as IUIBase).element.style; + style.overflow = "hidden"; + style.textOverflow = "ellipsis"; + style.display = "block"; } } -- To stop receiving notification emails like this one, please contact [email protected].
