[WIP] Drag and drop support#55
Open
JoelStansbury wants to merge 4 commits into
Open
Conversation
JoelStansbury
commented
Dec 19, 2021
| var op_children = []; // new children of old_parent | ||
|
|
||
| var update_np_quietly = false; | ||
| // If updating the old_parent's children changes the index of a new ancestor |
Author
There was a problem hiding this comment.
This is complete guess work. I don't know what is happening behind the scenes, but these are the assumptions that led to a working solution. There was definitely some funny duplication happening, though I cannot say for certain that it was due to the index changing, just that it happened when the index changed
Author
|
I just found out that the duplication glitch shows up again when multi-select is enabled. Putting this back into WIP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I should have some more time to work on this in a couple weeks (after finals). The key findings are the need to add the
dndoption to thepluginslist and that the move event can be triggered on viamove_node.jstree.The current logic for updating children nodes and all that (327-353) fails to update other copies of the ipytree widget (due to the silent option) so that needs to be reworked.
Also, there should probably be an option for enabling and disabling
dnd. I'm not sure how to do that yet.