How do i create an drag drop system with limits

Here is my prototype drag drop system. The problem is ball jumps from endpoints. I just wanted to drag in the line zone.

dzone