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
commit 210d362d30299fbdd1f63104ed36e1126f7ae373 Author: Alex Harui <[email protected]> AuthorDate: Mon Dec 7 19:50:16 2020 -0800 Spark Label is a 'native' control (no view) so it has to send notifications if its size changes as the text changes --- .../src/main/royale/spark/components/supportClasses/TextBase.as | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/TextBase.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/TextBase.as index aaed390..5766edd 100644 --- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/TextBase.as +++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/TextBase.as @@ -560,6 +560,15 @@ public class TextBase extends UIComponent implements IDisplayText _text = value; textNode.nodeValue = value; this.dispatchEvent('textChange'); + var contentWidth:Boolean = this.isWidthSizedToContent(); + var contentHeight:Boolean = this.isHeightSizedToContent(); + var eventType:String = null; + if (contentWidth) + eventType = "widthChanged"; + if (contentHeight) + eventType = contentWidth ? "sizeChanged" : "heightChanged"; + if (eventType) + dispatchEvent(eventType); } }
