forked from enlightenment/efl
view_manager_scroll: fix not to move view position by click
Summary: Previously, view position was moved by click because transition information was initialized in mouse move instead of mouse down. Now, transition information is initialized in mouse down so view position is not moved by click. Test Plan: 1. Run Efl.Ui.Active_View Scroll 2. Click Next button 2 times 3. Click Button Page Or 3. Drag Button Page a bit to the left and click multiple times Reviewers: bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9173
This commit is contained in:
parent
d3dbd5a5cd
commit
b892fa3ce7
|
@ -105,6 +105,10 @@ _mouse_down_cb(void *data,
|
|||
pd->mouse_move.active = EINA_TRUE;
|
||||
pd->mouse_move.from = efl_ui_active_view_active_index_get(pd->container);
|
||||
pd->mouse_move.mouse_start = efl_input_pointer_position_get(ev);
|
||||
|
||||
pd->transition.from = pd->mouse_move.from;
|
||||
pd->transition.to = pd->transition.from + 1;
|
||||
pd->transition.progress = 0.0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -124,9 +128,7 @@ _mouse_move_cb(void *data,
|
|||
pos_y_diff = pd->mouse_move.mouse_start.x - pos.x;
|
||||
|
||||
pd->transition.active = EINA_TRUE;
|
||||
pd->transition.from = pd->mouse_move.from;
|
||||
pd->transition.progress = (double)pos_y_diff / (double)pd->page_size.w;
|
||||
pd->transition.to = pd->transition.from + 1;
|
||||
|
||||
_propagate_progress(data, pd->transition.from + pd->transition.progress);
|
||||
|
||||
|
|
Loading…
Reference in New Issue