fix window animator center scale

This commit is contained in:
lixianjing 2019-09-24 17:55:39 +08:00
parent 5d3e9102cd
commit 2af0f475b5

View File

@ -24,6 +24,9 @@
static ret_t window_animator_center_scale_update_percent(window_animator_t* wa) {
if (wa->open) {
wa->percent = 0.9f + 0.1f * wa->easing(wa->time_percent);
if(wa->easing(wa->time_percent) == 0){
wa->percent = 0;
}
} else {
wa->percent = 1.0f - 0.1f * wa->easing(wa->time_percent);
}