angular-swing
angular-swing copied to clipboard
Destroying cards / fading them out
Hi,
you've shown methods on how to add and remove cards but these methods only work if the cards are untouched.
I would like to be able to remove these cards on the throw out event handler. Is there a function like $scope.card[0].destroy()?
Thanks
@jcb121 Why don't you just remove them with the ChildNove.remove()
method?
Like this:
$scope.throwout = function(eventName, eventObject) {
eventObject.target.remove();
};
@jcb121 in angular-swing.js line 514
Card.isThrowOut = function (offset, element, throwOutConfidence) { element.remove(); return throwOutConfidence === 1; };
add element.remove();