chenglou / react-motion

A spring that solves your animation problems.
MIT License
21.68k stars 1.16k forks source link

trigger OnMouseEnter (mouse events in general) while dragging <Motion /> #351

Open gfantom opened 8 years ago

gfantom commented 8 years ago

If I have a drop zone for a component, and I want to trigger the drop zone's OnMouseEnter or OnMouseOver effect (let's say to change the class of the drop zone to "dropzone-success" or something) while dragging, is there a way to do this? I think right now, the div doesn't detect the mouse as being over it b/c it's technically over the component. I've been scratching my head at this one for a while, but I just can't seem to come up with a clever hack for it.

buildog commented 7 years ago

@gfantom did you find something for this?

gfantom commented 7 years ago

@buildog I'm not sure if I'm remembering correctly since it was so long ago, but I think this problem had something to do with the Chrome browser. I never found a fix for this problem, but what you could do is track your mouse position within the DOM within your component... but it would be annoying to code.