Skip to content
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

issue #149 - updated serialize branch, even on drag #152

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

issue #149 - updated serialize branch, even on drag #152

wants to merge 1 commit into from

Conversation

maikelmclauflin
Copy link
Contributor

No description provided.

@johnny
Copy link
Owner

johnny commented Nov 23, 2014

This makes dragging more expensive. What is the reason for this change? Perhaps we can find less CPU intensive way to do it.

@maikelmclauflin
Copy link
Contributor Author

The reason for this change is to have an updated tree on drag. Without this feature, if a serialize is called the tree that is returned is the tree that is started with, before drag. What part of this is cpu intensive? There is no dom querying, since all of the elements are already in memory. Are you seeing any lag?

@johnny
Copy link
Owner

johnny commented Nov 23, 2014

I have the feeling that this use case is very unique and I therefore hesitate to merge this. Why do you need to serialize during drag?

One way to solve your problem would be to add custom data attributes to the placeholder and the dragged item. In a post processing step you could then replace the serialized placeholder (identified by the custom data attribute) with the serialized dragged item

Edit: actually, I don't know if the placeholder is serialized. Is it?

Another way to solve this would be to override the afterMove method to save the current location of the placeholder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants