title: Jquery draggable constrain using drag function
body: <p>I need to use jQuery draggable in quite a complicated geometrical shape, and it is not possible to calculate the frame beforehand.</p>
  
  <p>So, containment option isn't cut for solving this problem.</p>
  
  <p>I've been thinking about drag function, checking my condition and returning false to prevent dragging.
  But, the problem is, that after returning false from drag function for the first time, dragging process stops, as if user have released the mouse button.</p>
  
  <p>Any suggestions on preventing dragging out of the shape without canceling dragging process?</p>