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 0cdad3a Under Spark, systemManager can be null in this context.
new b27a92f Merge pull request #1034 from
estanglerbm/uitextformat-under-spark
0cdad3a is described below
commit 0cdad3a806efb6202c30eaf678692cbf331f90e7
Author: Edward Stangler <[email protected]>
AuthorDate: Mon Jan 4 06:31:09 2021 -0600
Under Spark, systemManager can be null in this context.
---
.../projects/MXRoyale/src/main/royale/mx/core/UITextFormat.as | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UITextFormat.as
b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UITextFormat.as
index 1b2d696..d8f6226 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UITextFormat.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UITextFormat.as
@@ -574,11 +574,11 @@ public class UITextFormat extends TextFormat
var measuringElement:HTMLSpanElement = measuringElementRef;
if (!measuringElement) {
- measuringElementRef = (systemManager as
SystemManager).measuringElement;
+ measuringElementRef = (systemManager ? (systemManager as
SystemManager).measuringElement : null);
measuringElement = measuringElementRef;
if (!measuringElement) {
var sm:SystemManager = systemManager as SystemManager;
- if (sm.measuringElement == null)
+ if (!sm || sm.measuringElement == null)
{
measuringElement = document.createElement("span") as
HTMLSpanElement;
//everything else is absolute position so should be above
this element
@@ -587,8 +587,8 @@ public class UITextFormat extends TextFormat
//sm.measuringElement.style.display = "none"; // to try to
keep it hidden
measuringElement.style.opacity = 0;
measuringElement.style["pointer-events"] = "none";
- sm.element.appendChild(measuringElement);
- sm.measuringElement = measuringElement;
+ if (sm) sm.element.appendChild(measuringElement);
+ if (sm) sm.measuringElement = measuringElement;
}
}
}