You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by cd...@apache.org on 2021/03/05 08:55:21 UTC
[royale-asjs] 08/09: SparkRoyale: Add implementation of
removeAllElements in Group
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch feature/distribution-allignment
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit fc8a5c0eccd3f9c4da640b6009cae5feeb983f3f
Author: Piotr Zarzycki <pi...@gmail.com>
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