Skip to content

How can I execute a function after this.selection.startSelecting(evt); is completed in order to remove selected elements based on attributes? #2785

Answered by kumilingus
goyaljai1 asked this question in Q&A
Discussion options

You must be logged in to vote

You can listen to the next collection reset event:

paper.on('blank:pointerdown', (evt) => {
    selection.startSelecting(evt);
    selection.collection.once('reset', () => graph.removeCells(selection.collection.toArray());
});

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by goyaljai1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants