Thanks to visit codestin.com
Credit goes to github.com

Skip to content

big sidepanel drag&drop helper rewrite #2813

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

Merged
merged 1 commit into from
Oct 13, 2024
Merged

Conversation

adumesny
Copy link
Member

@adumesny adumesny commented Oct 13, 2024

Description

Updated two.html to showcase all use cases and more. TODO: simplify other demos...

Checklist

  • Created tests which fail without the change (if possible)
  • All tests passing (yarn test)
  • Extended the README / documentation, if necessary

* fix gridstack#2231 gridstack#1840 gridstack#2354
* big overall to how we do sidepanel drag&drop helper
* `clone()` helper is now passed full HTML element dragged, not an event
* use any class/structure you want for side panel items
* `GridStack.setupDragIn()` now support associating a `GridStackWidget` for each sidepanel that will be used to define what to create on drop!
* if no `GridStackWidget` is defined, the helper will now be inserted as is, and NOT original sidepanel item.

Updated two.html to showcase all use cases and more.
TODO: simplify other demos...
@adumesny adumesny merged commit 546a1a7 into gridstack:master Oct 13, 2024
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.

Can't set an id to a widget through setupDragIn
1 participant