Open karneaud opened 6 years ago
Add a 👍 reaction to this issue if you would like to see this feature added. Do not add +1 comments — They will be deleted.
this should be a very-very usefull feature!!.. 👌
Possible to make div inside parent div draggable in one way? For example, swipe push to the left/right side, hide notification at bottom of page by swipe down gesture...
This would be a very convenient feature.
Until it gets implemented, we can get a similar effect by passing an absolutely positioned element to the containment
option:
var $containment=$('<div id="containment"></div>').css({
position: 'absolute',
left: '20px',
top: '200px',
width: '400px',
height: '400px'
}).insertBefore($draggable);
$draggable.draggabilly({
containment: $containment[0]
});
See a demo here.
**feature request
Is there a way to return a rect object if not a function instead of an element in order to set the movement contraint?
e.g