You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by yi...@apache.org on 2019/03/17 12:59:43 UTC

[royale-asjs] branch color_picker updated: Fix positioning of load indicator

This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/color_picker by this push:
     new 148a4e8  Fix positioning of load indicator
148a4e8 is described below

commit 148a4e8b6740f96549b65226b6ef56caf7da5a4b
Author: DESKTOP-RH4S838\Yishay <yi...@hotmail.com>
AuthorDate: Thu Mar 14 14:07:58 2019 +0200

    Fix positioning of load indicator
---
 .../royale/org/apache/royale/html/beads/DisableLoaderBead.as  | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DisableLoaderBead.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DisableLoaderBead.as
index deb6d59..1ce5e3d 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DisableLoaderBead.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/DisableLoaderBead.as
@@ -26,10 +26,12 @@ package org.apache.royale.html.beads
 	import org.apache.royale.geom.Point;
 	import org.apache.royale.html.LoadIndicator;
 	import org.apache.royale.utils.PointUtils;
+	import org.apache.royale.core.IPopUpHost;
+	import org.apache.royale.utils.UIUtils;
 
 	COMPILE::JS
-    {
-		import org.apache.royale.core.WrappedHTMLElement;
+	{
+	import org.apache.royale.core.WrappedHTMLElement;
 	}
 	/**
 	 *  The DisableLoaderBead class is a specialty bead that can be used with
@@ -117,7 +119,7 @@ package org.apache.royale.html.beads
 		
 		protected function addLoadIndicator():void
 		{
-			var point:Point = PointUtils.localToGlobal(new Point(host.x, host.y), host);
+			var point:Point = PointUtils.localToGlobal(new Point(0, 0), host);
 			_loader = new LoadIndicator();
 			_loader.x = point.x;
 			_loader.y = point.y;
@@ -127,7 +129,8 @@ package org.apache.royale.html.beads
 			{
 				_loader.element.style.position = "absolute";
 			}
-			(host.topMostEventDispatcher as IParent).addElement(_loader);
+				var popupHost:IPopUpHost = UIUtils.findPopUpHost(_strand as IUIBase);
+				popupHost.popUpParent.addElement(_loader);
 		}
 		
 		protected function removeLoadIndicator():void