Skip to content

Commit 5afd404

Browse files
committed
fix animatable
1 parent 34b688f commit 5afd404

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

haxe/ui/containers/Collapsible.hx

+5-2
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,6 @@ class CollapsibleBuilder extends CompositeBuilder {
151151
super(collapsible);
152152
_collapsible = collapsible;
153153
// we'll start off as non-animatable so things dont animate at the start of the component creation
154-
_originalAnimatable = _collapsible.animatable;
155-
_collapsible.animatable = false;
156154
_component.recursivePointerEvents = false;
157155
_header = new HBox();
158156
_header.percentWidth = 100;
@@ -182,6 +180,11 @@ class CollapsibleBuilder extends CompositeBuilder {
182180
_collapsible.registerInternalEvents(true);
183181
}
184182

183+
public override function onInitialize() {
184+
_originalAnimatable = _collapsible.animatable;
185+
_collapsible.animatable = false;
186+
}
187+
185188
public override function onReady() {
186189
super.onReady();
187190
_collapsible.animatable = _originalAnimatable;

0 commit comments

Comments
 (0)