efl_page_transition_scroll: bug fix in update function

since page_infos are connected in a circular manner,
one node (head or tail) moves in the opposite direction when scrolled.
there was a bug in hiding such nodes and
this patch fixes it.
This commit is contained in:
Jaeun Choi 2018-12-13 17:59:47 +09:00
parent 549bf6e269
commit 690269e055
1 changed files with 15 additions and 3 deletions

View File

@ -303,7 +303,7 @@ _efl_page_transition_scroll_update(Eo *obj,
int tmp_id, curr_page, cnt;
Eo *tmp;
Eina_List *list;
Page_Info *pi, *tpi;
Page_Info *pi, *tpi, *dummy;
t = pos;
if (t < 0) t *= (-1);
@ -330,8 +330,6 @@ _efl_page_transition_scroll_update(Eo *obj,
efl_gfx_entity_geometry_set(pi->obj, (Eina_Rect) pi->temp);
if (!pi->vis_page && !tpi->vis_page) continue;
if (!eina_rectangles_intersect(&pi->temp, &pd->viewport))
{
if (pi->content)
@ -379,6 +377,20 @@ _efl_page_transition_scroll_update(Eo *obj,
}
}
}
if (pos < 0) dummy = pd->tail;
else dummy = pd->head;
if (dummy->visible)
{
efl_canvas_object_clip_set(dummy->obj, pd->backclip);
efl_pack_unpack(dummy->obj, dummy->content);
efl_canvas_object_clip_set(dummy->content, pd->backclip);
dummy->content_num = -1;
dummy->content = NULL;
dummy->visible = EINA_FALSE;
}
}
EOLIAN static void