Page MenuHomePhabricator

Need to have geometric information for each items on the Position Manager
Open, Incoming QueuePublic


Although we will store width and height information on the Size Model,
real position of item {x, y} is unstored in the model data,
and it causing problem while we want to get proper geometric information on the item.

there are two demands for this information,
one is item scroll bring in feature,
which should know given input item's geometric information and move the target position.

in legacy, we provide elm_genlist_at_xy_item_get,
so user can get the item within given x,y coordinate.
(x,y can be out of viewport area)
also we could provide item's geometry_get for user as their demands,
in realize cases, we could just repacking item layout's geometry and give it to them,

but in unrealize cases, we should have pre-calculated geometry infomation for solving all this requirements.

having x and y properties in the size model can be a solution for this,
but in homogeneous case it will be redandant data, as we could get the position of item by multiply width and index.

if user want to have two different styles,
with one is homogenous,
the other one is different,
the solution for multiplying width and index could be inaccurate.

what is the best way for this?

SanghyeonLee assigned this task to cedric.

Please see position_single_item in position manager :)

This will automatically use the information that is served to the position manager.

SanghyeonLee added a comment.EditedAug 19 2019, 2:57 AM

I'm not sure @cedric is okay with keeping cache data without model in listview.
also calculating item position in every calls could be inefficient if it calls frequently..

the way that position_manager_list does could be good for homogeneous case,
and most of list are homogeneous at least in the same style,
so the approach looks fresh.