Open cpa0701 opened 2 weeks ago
Yes, that's correct, seems expensive but actually it's quick (not sure if you how would do with thousands nodes ^_^) The alternative would try to revert a single action but that's complex and some node would need to implement themself to rollback. I had tried an internal implementation that works that way, probably needs some refactoring and fixing but that's the concept, https://github.com/atlasan/litegraph.js/blob/2ebb3fde22e7e7e367eecab11a7a45b38c8f6f70/src/litegraph.js#L154
like title ,How to realize redo and undo?do we have to save schemas in every changing?