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

Looking for an event for when a widget is dragged from the toolbar and onto the grid (when the placeholders are placed). #2761

Closed
te9ju opened this issue Aug 29, 2024 · 2 comments

Comments

@te9ju
Copy link

te9ju commented Aug 29, 2024

Subject of the issue

Looking for an event for when a widget is dragged from the toolbar and onto the grid (when the placeholders are placed).

Your environment

  • version of gridstack.js - 10.3.1
  • Arc Browser/MacOS

Steps to reproduce

UI Screenshot

Expected behavior

I'd like to know if there is any event for when a widget is dragged from the toolbar and onto the grid (when the placeholders are placed). I'm looking to write a behaviour wherein widgets in a row automatically resize their widths to allow placement of a new widget (dragged from the toolbar).

@adumesny
Copy link
Member

those are the public events
/** list of possible events, or space separated list of them */
export type GridStackEvent = 'added' | 'change' | 'disable' | 'drag' | 'dragstart' | 'dragstop' | 'dropped' |
'enable' | 'removed' | 'resize' | 'resizestart' | 'resizestop' | 'resizecontent';

but I suppose you could have your own OS level addEventListener('mouseenter') which is what grid uses (on desktop, 'pointerenter' on mobile) or maybe even our own generated 'dropover'

if you want to sponsor this, it could probably be supported by the lib.

@adumesny
Copy link
Member

adumesny commented Sep 9, 2024

dup of #2627

@adumesny adumesny closed this as completed Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants