Been on the drag n' drop problem, trying to find a Javascript version that works.
Below, adapted code from javacript.info that works fine on Chrome; but am not
getting past the default refusal to drop on Firefox while nothing moves at all on
Edge. page.X, page.Y are used to track the mouse position, but that seems to be part
of jQuery on W3 Schools. Need to dig more...
https://plnkr.co/edit/scGSrvI4sJx6HnpQRCf7?p=preview
The below Plunk is that of the authors: there is now a 'droppable' net that turns pink
when approached. It is tricky to code for this because mouse events only occur on
the top level. One has to programmatically find there is an element below the wandering
ball with elementFromPoint().
http://plnkr.co/edit/7tHfutBIdz1lq1zxiC0A?p=preview
No comments:
Post a Comment