Closed franciscolourenco closed 6 years ago
Parallax!
Thanks for reporting this issue. I think the best way to resolve this issue is use handles, using the back handle technique
See demo https://codepen.io/desandro/pen/cf3b102c0d3e3e97f915151d12588bfb/
What do you think about adding an option to exclude the children from triggering the drag? Something in the lines of https://github.com/aristidesfl/draggabilly/commit/4c52fb1c73c0795bbfb5ebd1ba4450ad1b77bb7c
Nice move! I don't feel this option is necessary to be added to master. However, you can monkey punch it with this code
Draggabilly.defaults.excludeChildren = false;
var pointerDown = Draggabilly.prototype.pointerDown;
Draggabilly.prototype.pointerDown = function( event, pointer ) {
if (this.options.excludeChildren && this.element !== event.target) {
return;
}
pointerDown.apply( this, arguments );
};
When draggables are nested, dragging the child will also drag the parent. Any solution to prevent parents from being dragged as well?
https://codepen.io/aristidesfl/pen/NdQzXP