How can I execute a function after this.selection.startSelecting(evt); is completed in order to remove selected elements based on attributes? #2785
-
IntroductionI’m using a selection tool in my application that initiates with this.selection.startSelecting(evt); when a user begins the selection process. I want to execute a cleanup function once the selection is complete to remove certain elements based on their attribute properties. Steps to reproduceNo response Restrictions & ConstraintsNo response Does your question relate to JointJS or JointJS+. Select both if applicable.JointJS, JointJS+ |
Beta Was this translation helpful? Give feedback.
Answered by
kumilingus
Nov 5, 2024
Replies: 1 comment
-
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());
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
goyaljai1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can listen to the next collection reset event: