mirror of
https://github.com/rive-app/rive-flutter.git
synced 2025-08-06 08:29:35 +08:00
Treat all Constraints and ClippingShapes differently than children when propagating collapse
Decided to go with the `is` check because it seems like all types of Constraints or ClippingShapes should follow this behavior now and in the future. Diffs= 16cf8082f Treat Constraints, ClippingShapes and DrawRules as special Solo child types (#5897) Co-authored-by: Philip Chung <philterdesign@gmail.com>
This commit is contained in:
@ -1 +1 @@
|
||||
e1b9d360b4ab7a2620f888cb9b4497d253e1da80
|
||||
16cf8082fd9a66014305994c736d98cc12d96c73
|
||||
|
@ -1,9 +1,8 @@
|
||||
import 'package:rive/src/generated/solo_base.dart';
|
||||
import 'package:rive/src/rive_core/component.dart';
|
||||
import 'package:rive/src/rive_core/constraints/constraint.dart';
|
||||
import 'package:rive/src/rive_core/container_component.dart';
|
||||
import 'package:rive/src/rive_core/shapes/clipping_shape.dart';
|
||||
|
||||
import 'package:rive/src/generated/solo_base.dart';
|
||||
export 'package:rive/src/generated/solo_base.dart';
|
||||
|
||||
class Solo extends SoloBase {
|
||||
@ -29,11 +28,9 @@ class Solo extends SoloBase {
|
||||
// as they are more aking to properties of the solo itself. For those
|
||||
// components, simply pass on the collapse value of the solo itself.
|
||||
for (final child in children) {
|
||||
switch (child.coreType) {
|
||||
case ConstraintBase.typeKey:
|
||||
case ClippingShapeBase.typeKey:
|
||||
child.propagateCollapse(collapse);
|
||||
continue;
|
||||
if (child is Constraint || child is ClippingShape) {
|
||||
child.propagateCollapse(collapse);
|
||||
continue;
|
||||
}
|
||||
|
||||
// This child is part of the solo set so only make it active if it's the
|
||||
|
Reference in New Issue
Block a user