summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Shcherbina <o.shcherbina@samsung.com>2015-08-28 20:32:45 +0900
committerChunEon Park <hermet@hermet.pe.kr>2015-08-28 20:32:46 +0900
commitc850cc0d80b754be851576083eba27a72b58b9f2 (patch)
treebb0c025ca8ec0fcbc041db499118a7b0019e613a
parentb35d2f976267b3b03124108aafb1d56219930ab2 (diff)
evas_canvas3d: Recalculation coordinates for pick object from scene
Summary: Change recalculation coordinate for pick to depend on size of viewport, not from scene data. Due to not correct working pick in case resize view window. @fix Reviewers: cedric, Hermet Reviewed By: Hermet Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2950
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_scene.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/evas/canvas/evas_canvas3d_scene.c b/src/lib/evas/canvas/evas_canvas3d_scene.c
index 1f039ff0f2..518bcbe5dd 100644
--- a/src/lib/evas/canvas/evas_canvas3d_scene.c
+++ b/src/lib/evas/canvas/evas_canvas3d_scene.c
@@ -608,8 +608,8 @@ _evas_canvas3d_scene_pick(const Eo *obj, Evas_Canvas3D_Scene_Data *pd, Evas_Real
608 pd_parent = eo_data_scope_get(obj, EVAS_CANVAS3D_OBJECT_CLASS); 608 pd_parent = eo_data_scope_get(obj, EVAS_CANVAS3D_OBJECT_CLASS);
609 e = eo_data_scope_get(pd_parent->evas, EVAS_CANVAS_CLASS); 609 e = eo_data_scope_get(pd_parent->evas, EVAS_CANVAS_CLASS);
610 610
611 data.x = ((x * 2.0) / (Evas_Real)pd->w) - 1.0; 611 data.x = ((x * 2.0) / ((Evas_Real)e->viewport.w)) - 1.0;
612 data.y = (((pd->h - y - 1) * 2.0) / ((Evas_Real)pd->h)) - 1.0; 612 data.y = ((((Evas_Real)e->viewport.h - y - 1) * 2.0) / ((Evas_Real)e->viewport.h)) - 1.0;
613 data.picked = EINA_FALSE; 613 data.picked = EINA_FALSE;
614 data.z = 1.0; 614 data.z = 1.0;
615 data.node = NULL; 615 data.node = NULL;