Make draggable contianment array use the parent div coordinates instead of the window

Make draggable contianment array use the parent div coordinates instead of the window

I was playing around with the draggable containment array [x1, y1, x2, y2] and it seems that it uses the coordinates of the window instead of the coordinates of the parent div. Is there any way to make the containment use coordinates of the parent div. The problem being my draggable item is larger than the parent div so I can't have it contained to just the parent.

Basically what I'm going for is creating a window (div 1) with overflow set to hidden. Then placing an image in that div that is larger than div 1, but allows the user to drag the image so that it takes up the entire div 1 window at all times. Basically they can't drag the div further down than top = 0 but it can allow for top to be negative. Hence I need to contain the movement to certain points. 

Here's an example of what I'm doing. http://jsfiddle.net/MArUJ/7/
    • Topic Participants

    • jason