Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[WIP] Drag and drop support #55

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

JoelStansbury
Copy link

@JoelStansbury JoelStansbury commented Nov 28, 2021

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 dnd option to the plugins list and that the move event can be triggered on via move_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.

@JoelStansbury JoelStansbury changed the title [WIP] Drag and drop support Drag and drop support 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
Copy link
Author

@JoelStansbury JoelStansbury Dec 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@JoelStansbury
Copy link
Author

I just found out that the duplication glitch shows up again when multi-select is enabled. Putting this back into WIP

@JoelStansbury JoelStansbury changed the title Drag and drop support [WIP] Drag and drop support Jan 14, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant