Skip to content

Destroying cards / fading them out #21

Open

Description

@jcb121

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

Activity

  1. goncalomarques commented on May 5, 2016

    @goncalomarques

    @jcb121 Why don't you just remove them with the ChildNove.remove() method?

    Like this:

    $scope.throwout = function(eventName, eventObject) {
         eventObject.target.remove(); 
    };
    
  2. zwxiang commented on Aug 2, 2016

    @zwxiang

    @jcb121 in angular-swing.js line 514

    Card.isThrowOut = function (offset, element, throwOutConfidence) {
    element.remove();
    return throwOutConfidence === 1;
    };

    add element.remove();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions