This is an automated email from the ASF dual-hosted git repository.
piotrz 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 ec4116b SparkRoyale: Add implementation of removeAllElements in Group
ec4116b is described below
commit ec4116ba3a1a25b7c7b8d98c18f92c55d0ae891e
Author: Piotr Zarzycki <[email protected]>
AuthorDate: Thu Mar 4 14:55:14 2021 +0100
SparkRoyale: Add implementation of removeAllElements in Group
---
.../SparkRoyale/src/main/royale/spark/components/Group.as | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git
a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Group.as
b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Group.as
index 226629f..4e8e5c4 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Group.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/Group.as
@@ -24,6 +24,7 @@ import mx.core.IUIComponent;
import spark.components.supportClasses.GroupBase;
import mx.core.mx_internal;
import mx.core.IVisualElement;
+ import org.apache.royale.core.IChild;
/*
import flash.display.BlendMode;
import flash.display.DisplayObject;
@@ -277,7 +278,12 @@ public class Group extends GroupBase /*implements
IVisualElementContainer,
public function removeAllElements():void
{
- // not implemented
+ for (var i:int = numElements - 1; i >= 0; i--)
+ {
+ var el:IChild = getElementAt(i);
+
+ removeElement(el);
+ }
}
public function set mouseEnabledWhereTransparent(value:Boolean):void