title: Jquery UI Draggable Containment
body: <p>I have an image that I can drag around a container using jQuery UI.</p>
  
  <p>I am using draggable("option", "containment", [x1, y1, x2, y2]) to set draggable containment which works perfectly.</p>
  
  <p>I have written a zoom slider which zooms the image, then recalculates the containment which works perfectly as well.</p>
  
  <p>However when I zoom out the image, it may sit outside of the newly calculated containment area, its position doesn't get updated until I start to drag again on the element, then it snaps within the containment area and I can continue to drag it.</p>
  
  <p>I want the element's position to update as I zoom in out if it falls outside of the containment area.  I was looking into simulating a drag event after zooming however I couldn't get it to work properly.</p>
  
  <p>Is there any way of refreshing the position of the element using the jQuery UI Draggable plugin?</p>
  
  <p>Thanks</p>