bryntum / support

An issues-only repository for the Bryntum project management component suite which includes powerful Grid, Scheduler, Calendar, Kanban Task Board and Gantt chart components all built in pure JS / CSS / TypeScript
https://www.bryntum.com
54 stars 6 forks source link

Built in inter widget drag #266

Open isglass opened 4 years ago

isglass commented 4 years ago

We should have a bryntum global drag handler, that allows dragging from any widget and dropping on any other. Something like this:

  1. Drag is started from a widget, lets say a Grid. The dragged elements are tagged with their respective record and handed over to the global handler.

  2. On mousemove/mouseup we resolve the widget which the mouse is currently over. Calls:

widget.onGlobalDrag(draggedElements) or widget.onGlobalDrop(draggedElements)

  1. The target widget decides what to do with it. Lets say dropped on scheduler, it could then check if the attached record is an event, assignment or something else it knows about and handle that. If something unknown, users code could handle it.

This would allow us to easily support dragging between our different products + it would simplify custom demos such as drag-onto-tasks by not needing to add any custom drag handler, only implement onGlobalDrop in the demo.

isglass commented 2 years ago

Or a way of specifying what you can drag, on what you can drop, and a function called when that happens