Hm, why don´t you take the distance between the panel and the mouse_pos?

In the moment left mouse is clicked you save this, and than start a while loop - I ´ll make an example for - just two minutes laugh