Add TouchDelegateArea property.
[platform/core/uifw/dali-core.git] / dali / internal / event / events / ray-test.cpp
old mode 100644 (file)
new mode 100755 (executable)
index cee959d..112c03a
@@ -156,7 +156,7 @@ bool RayTest::ActorTest(const Internal::Actor& actor, const Vector4& rayOrigin,
       // Ray travels distance * rayDirLocal to intersect with plane.
       distance = a / b;
 
-      const Vector3& size = node.GetSize(EventThreadServices::Get().GetEventBufferIndex());
+      const Vector2& size = actor.GetTouchDelegateArea() == Vector2::ZERO ? Vector2(node.GetSize(EventThreadServices::Get().GetEventBufferIndex())) : actor.GetTouchDelegateArea();
       hitPointLocal.x = rayOriginLocal.x + rayDirLocal.x * distance + size.x * 0.5f;
       hitPointLocal.y = rayOriginLocal.y + rayDirLocal.y * distance + size.y * 0.5f;