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

Delay redraw until drop. #703

Open
sakoht opened this issue Sep 13, 2023 · 1 comment
Open

Delay redraw until drop. #703

sakoht opened this issue Sep 13, 2023 · 1 comment

Comments

@sakoht
Copy link

sakoht commented Sep 13, 2023

I’m using drag and drop for both rows and columns in a large “heatmap” presented as an html table for a scientific application. The animation of the drag makes everything slow and jerky as the table redraws too much.

I’d like to have it, when dragging:

  • gray out the dragged element instead of hide it
  • visually highlight the drop target instead of temporarily inserting it

Then actually move the element only after drop has occurred.

Is this possible with dragula?

Note: When dragging the table columns I am just dragging the headers I have custom drip code redraw the tbody, but the browser slightly changes the whole column during the drag as the headers move around, so it would benefit from the same “delayed visual drop” as the rows.

@sakoht
Copy link
Author

sakoht commented Sep 13, 2023

It seems like I can change the behavior of the spruce element just by changing the css.

Preventing it from showing the element as inserted mid-drag is likely turning off one of the fancier features. Which is quite slick but too intensive for this use case of a mega table.

Hoping this is just a novel use case I don’t see in the docs, and not a full feature request!

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

No branches or pull requests

1 participant