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

Move event #962

Closed
qtbit opened this issue Feb 5, 2018 · 5 comments
Closed

Move event #962

qtbit opened this issue Feb 5, 2018 · 5 comments
Labels

Comments

@qtbit
Copy link

qtbit commented Feb 5, 2018

I'd like to use react-dnd to drag & drop container components into other container components to create a tree.
image

When moving a component, I'd liek to fire a redux action to update component positions on canvas to update e.g. the lines connecting the component with other components, move other components to create a space for the moving component etc.

image

Troubles

  • react-dnd misses onMove event where a redux action updating positions and properties of canvas objects could be fired (e.g. updating the connecting lines, highlighting underlying component border etc.)
  • react-dnd has hover event, but it is called only on hovering the target component not outside (on canvas, out of the canvas)
  • creating places on drop-target component where you can't drop (e.g. title) is not possible?
  • not possible to limit movement and remove lag as mnquintana wrote
@tommedema
Copy link

@qtbit how would you implement such onMove event with a HoC?

@guchengjie
Copy link

I also want to get the event object at the end of the drag. Self monitoring is also blocked.

@jt3k
Copy link

jt3k commented Jan 24, 2019

I also want to get a move or drag event, as implemented in the DOM API

@ronen
Copy link

ronen commented Feb 4, 2019

FWIW I've simply placed an onDragOver event on the relevant canvas component container, and it gets called normally with the drag event. The handler dispatches redux actions and it seems to work fine, while react-dnd continues to do its stuff.

@stale
Copy link

stale bot commented Jul 6, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 6, 2019
@stale stale bot closed this as completed Jul 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants