forked from enlightenment/enlightenment
parent
a58ddcbb92
commit
8d352bc01e
|
@ -17,11 +17,13 @@ struct _E_Smart_Data
|
|||
|
||||
E_Scrollframe_Policy hbar_flags, vbar_flags;
|
||||
|
||||
struct {
|
||||
struct
|
||||
{
|
||||
Evas_Coord x, y;
|
||||
Evas_Coord sx, sy;
|
||||
Evas_Coord dx, dy;
|
||||
struct {
|
||||
struct
|
||||
{
|
||||
Evas_Coord x, y;
|
||||
double timestamp;
|
||||
} history[20];
|
||||
|
@ -234,11 +236,13 @@ e_scrollframe_child_pos_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
|||
if (mx > 0) vx = (double)x / (double)mx;
|
||||
else vx = 0.0;
|
||||
if (vx < 0.0) vx = 0.0;
|
||||
else if (vx > 1.0) vx = 1.0;
|
||||
else if (vx > 1.0)
|
||||
vx = 1.0;
|
||||
if (my > 0) vy = (double)y / (double)my;
|
||||
else vy = 0.0;
|
||||
if (vy < 0.0) vy = 0.0;
|
||||
else if (vy > 1.0) vy = 1.0;
|
||||
else if (vy > 1.0)
|
||||
vy = 1.0;
|
||||
edje_object_part_drag_value_set(sd->edje_obj, "e.dragable.vbar", 0.0, vy);
|
||||
edje_object_part_drag_value_set(sd->edje_obj, "e.dragable.hbar", vx, 0.0);
|
||||
sd->pan_func.set(sd->pan_obj, x, y);
|
||||
|
@ -1123,3 +1127,4 @@ _e_smart_init(void)
|
|||
_e_smart = evas_smart_class_new(&sc);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue