Skip to content

Commit 2c302f6

Browse files
committed
change animation
1 parent 9075091 commit 2c302f6

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

haxe/ui/containers/Collapsible.hx

+8-4
Original file line numberDiff line numberDiff line change
@@ -54,35 +54,39 @@ private class CollapsedBehaviour extends DataBehaviour {
5454
// TODO: think about moving this to css animations... yuk.
5555
if (_component.animatable) {
5656
if (_value) {
57-
content.opacity = 0;
57+
//content.opacity = 0;
5858
var cy = content.height;
5959
var autoHeight = content.autoHeight;
6060
var animation = new AnimationBuilder(content, .3, "ease");
6161
animation.setPosition(0, "height", cy, true);
6262
animation.setPosition(100, "height", 0, true);
63+
/*
6364
animation.setPosition(0, "opacity", 1, true);
6465
animation.setPosition(100, "opacity", 0, true);
66+
*/
6567
animation.onComplete = function() {
6668
if (autoHeight) {
67-
content.height = null;
69+
@:privateAccess content._height = null;
6870
}
6971
content.hidden = _value;
7072
//_component.dispatch(new UIEvent(UIEvent.CHANGE));
7173
}
7274
animation.play();
7375
} else {
7476
content.hidden = _value;
75-
content.opacity = 0;
77+
//content.opacity = 0;
7678
var cy = content.height;
7779
var autoHeight = content.autoHeight;
7880
var animation = new AnimationBuilder(content, .3, "ease");
7981
animation.setPosition(0, "height", 0, true);
8082
animation.setPosition(100, "height", cy, true);
83+
/*
8184
animation.setPosition(0, "opacity", 0, true);
8285
animation.setPosition(100, "opacity", 1, true);
86+
*/
8387
animation.onComplete = function() {
8488
if (autoHeight) {
85-
content.height = null;
89+
@:privateAccess content._height = null;
8690
}
8791
//_component.dispatch(new UIEvent(UIEvent.CHANGE));
8892
}

0 commit comments

Comments
 (0)