-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
delete/deselect nodes question #2
Comments
You are right, the -1 I guess comes from when the very beginning when the id was the position in the nodes array, but thats no longer true so I removed the line. |
Thank you! How do you use the node methodes onDeselected/onSelected. |
What do you want to do? to use you must just add a callback in the node: |
…cks-and-prune-some-unused-styles add generic font fallbacks and prune some unused styles
Hi!
I have two questions.
Why is it necessary to set the node.id to -1 in LGraph.prototype.remove = function(node)?
I have implemented a onNodeRemoved(node) in my editor and the id is set to -1 my editor does not more find the particular node in it's own node collections.
Why does onNodeDeselected() not have a parameter? I changed it to onNodeDeselected(n) in all calling parts in litegraph.js in order to have my editor to be able to react on deselection of particular nodes.
Well, great work by the way. I think I will soon add some minor pull requests once I understand your intentions a little better.
Thanks
Sebastian
The text was updated successfully, but these errors were encountered: