summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/efl_canvas_animation_player.c
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2018-04-10 22:03:26 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2018-04-10 22:38:40 +0900
commit5351070a4d8d4e114823296bed190f079e865d82 (patch)
treeb1e155f3d3cb278a0e4120b5523cc49be0cd314d /src/lib/evas/canvas/efl_canvas_animation_player.c
parent503bb0c8f9e9ccdf3e5e833af814d129c9b34c2f (diff)
efl_canvas_animation_player: Reset map after animation is finished
Previously, beginning state of animation is applied after animation is finished if final_state_keep_get() is false. Now, map is reset (no animation is applied) after animation is finished if final_state_keep_get() is false.
Diffstat (limited to 'src/lib/evas/canvas/efl_canvas_animation_player.c')
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_player.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_animation_player.c b/src/lib/evas/canvas/efl_canvas_animation_player.c
index 1117c495ab..edc9bd1170 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_player.c
+++ b/src/lib/evas/canvas/efl_canvas_animation_player.c
@@ -213,19 +213,21 @@ _efl_canvas_animation_player_efl_player_stop(Eo *eo_obj,
213 (!(efl_animation_repeat_count_get(anim) & 1))) 213 (!(efl_animation_repeat_count_get(anim) & 1)))
214 { 214 {
215 pd->progress = 1.0; 215 pd->progress = 1.0;
216 efl_animation_apply(anim, pd->progress,
217 efl_animation_player_target_get(eo_obj));
216 } 218 }
217 else 219 else
218 { 220 {
219 pd->progress = 0.0; 221 pd->progress = 0.0;
222 efl_gfx_map_reset(efl_animation_player_target_get(eo_obj));
220 } 223 }
224 efl_event_callback_call(eo_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED, NULL);
221 } 225 }
222 else 226 else
223 { 227 {
224 pd->progress = 0.0; 228 pd->progress = 0.0;
229 efl_gfx_map_reset(efl_animation_player_target_get(eo_obj));
225 } 230 }
226 efl_animation_apply(anim, pd->progress, efl_animation_player_target_get(eo_obj));
227 if (play)
228 efl_event_callback_call(eo_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED, NULL);
229 231
230 if (pd->auto_del) efl_del(eo_obj); 232 if (pd->auto_del) efl_del(eo_obj);
231} 233}