enventor_smart: make the position of live edit item show correctly when mirror mode is applied

Summary:
when mirror mode is applied, the live edit item is added to wrong position.
so I added mirror mode checking to show correctly.

@T3368

Test Plan:
1. launcher enventor
2. enable mirror mode
3. add a live edit item to preview
4. check that the position of the item is right

Reviewers: Hermet, Jaehyun_Cho, NikaWhite

Differential Revision: https://phab.enlightenment.org/D3834
This commit is contained in:
Taehyub Kim 2016-03-29 19:38:54 +09:00 committed by Hermet Park
parent c0942cd60a
commit 6b19c191ac
1 changed files with 9 additions and 0 deletions

View File

@ -743,6 +743,15 @@ _enventor_object_template_part_insert(Eo *obj EINA_UNUSED,
float rel1_x, float rel1_y, float rel2_x,
float rel2_y, char *syntax, size_t n)
{
if (pd->mirror_mode)
{
float x1, x2;
x1 = 1.0 - rel2_x;
x2 = 1.0 - rel1_x;
rel1_x = x1;
rel2_x = x2;
}
return template_part_insert(pd->ed, part, insert_type, rel1_x, rel1_y, rel2_x,
rel2_y, NULL, syntax, n);
}