The Drag.Move.Inside class makes it easy to check if an element is inside another element while dragging one of the elements.
Similar to Drag.Move, Drag.Move.Inside needs all of the same informations.
new Drag.Move.Inside(document.id('drag'), { container: $$('#inside>div')[0], droppables: $$('#inside .drop'), onInside: function(element, droppable){ droppable.setStyle('background', '#E79D35'); }, onLeaveInside: function(element, droppable){ droppable.setStyle('background', '#6B7B95'); }, onDrop: function(element, droppable){ if (droppable) droppable.setStyle('background', '#C17878'); } });
A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.
Found a bug in this plugin? Please report it this repository's Github Issues.
blog comments powered by Disqus