Skip to content

Commit a522dff

Browse files
committed
Fixing effect on self.
1 parent 2375f0c commit a522dff

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

flare_dart/lib/actor_layer_effect_renderer.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class ActorLayerEffectRenderer extends ActorDrawable {
4545

4646
@override
4747
void onParentChanged(ActorNode from, ActorNode to) {
48+
super.onParentChanged(from, to);
4849
from?.findLayerEffect();
4950
to?.findLayerEffect();
5051
findEffects();
@@ -88,7 +89,7 @@ class ActorLayerEffectRenderer extends ActorDrawable {
8889
// Alternative way to do this is to have each drawable check for parent
8990
// layers when the parent changes. That would be more effective if nodes
9091
// were to get moved around at runtime.
91-
parent?.eachChildRecursive((node) {
92+
parent?.all((node) {
9293
if (node is ActorDrawable && node != this) {
9394
node.layerEffectRenderer = this;
9495
}
@@ -114,7 +115,8 @@ class ActorLayerEffectRenderer extends ActorDrawable {
114115
var renderMask = ActorLayerEffectRendererMask(mask);
115116
mask.source?.all((child) {
116117
if (child is ActorDrawable) {
117-
if (child.layerEffectRenderer != null) {
118+
if (child.layerEffectRenderer != null &&
119+
child.layerEffectRenderer != this) {
118120
// Layer effect is direct discendant of this layer, so we want to
119121
// draw it with the other drawables in this layer.
120122
renderMask.drawables.add(child.layerEffectRenderer);

0 commit comments

Comments
 (0)