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 2018/05/02 10:06:30 UTC

[royale-asjs] branch develop updated: Take care of all items added detected by observer, not just the first one.

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 cf411bc  Take care of all items added detected by observer, not just the first one.
cf411bc is described below

commit cf411bcff686d9a592b424943a00f8cc8fad59f9
Author: DESKTOP-RH4S838\Yishay <yi...@hotmail.com>
AuthorDate: Wed May 2 13:06:23 2018 +0300

    Take care of all items added detected by observer, not just the first one.
---
 .../html/beads/StyleInheritanceWithObserverBead.as       | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/StyleInheritanceWithObserverBead.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/StyleInheritanceWithObserverBead.as
index 5996b1d..4d8116c 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/StyleInheritanceWithObserverBead.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/StyleInheritanceWithObserverBead.as
@@ -18,11 +18,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.royale.html.beads
 {
-	import org.apache.royale.core.IRenderedObject;
 	import org.apache.royale.core.IStrand;
-	import org.apache.royale.core.IBead;
 	COMPILE::JS {
-		import org.apache.royale.events.IEventDispatcher;
 		import org.apache.royale.core.WrappedHTMLElement;
 	}
 	
@@ -73,12 +70,15 @@ package org.apache.royale.html.beads
 		COMPILE::JS
 		private function mutationDetected(mutationsList:Array):void
 		{
-			var mutationRecord:MutationRecord = mutationsList[0] as MutationRecord;
-			var addedElements:NodeList = mutationRecord.addedNodes as NodeList;
-			for (var i:int = 0; i < addedElements.length; i++)
+			for (var j:int = 0; j < mutationsList.length; j++)
 			{
-				var addedElement:WrappedHTMLElement = addedElements[i] as WrappedHTMLElement;
-				addedElement.style[styleName] = 'inherit';
+				var mutationRecord:MutationRecord = mutationsList[j] as MutationRecord;
+				var addedElements:NodeList = mutationRecord.addedNodes as NodeList;
+				for (var i:int = 0; i < addedElements.length; i++)
+				{
+					var addedElement:WrappedHTMLElement = addedElements[i] as WrappedHTMLElement;
+					addedElement.style[styleName] = 'inherit';
+				}
 			}
 		}
 

-- 
To stop receiving notification emails like this one, please contact
yishayw@apache.org.