valor-software/ng2-dragula

View on GitHub
apps/demo/src/app/examples/04-revert.component.html

Summary

Maintainability
Test Coverage
<div class='parent'> <label for='hy'>By default, dropping an element outside of any known containers will keep the element in the last
        place it went over. You can make elements go back to origin if they're dropped outside of known containers,
        too.</label>
    <div class='wrapper'>
        <div class='container' dragula="REVERT">
            <div>Moving items between containers works as usual</div>
            <div>If you try to drop an item outside of any containers, though, it'll retain its original position</div>
            <div>When that happens, a <code>cancel</code> event will be raised</div>
        </div>
        <div class='container' dragula="REVERT">
            <div>Note that the dragged element will go back to the place you originally dragged it from, even if you
                move it over other containers
            </div>
            <div>This is useful if you want to ensure drop events only happen when the user intends for them to happen
                explicitly, avoiding surprises
            </div>
        </div>
    </div>
    <pre><code>{{ code }}</code></pre>
</div>