jberglinds / beerpong-web

http://jberglinds.github.io/beerpong-web
0 stars 0 forks source link

Moving cups #7

Open emillind opened 7 years ago

emillind commented 7 years ago

To skip drag and drop we can have a button for move and then some set formations.

jberglinds commented 7 years ago

Not sure how predefined formations would work but maybe. We should probably at least make a try with drag/drop. Maybe it's not that hard to implement: https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API

jberglinds commented 7 years ago

Tried something pretty basic from here: https://www.html5rocks.com/en/tutorials/dnd/basics/#disqus_thread It works but not yet on mobile - https://github.com/timruffles/ios-html5-drag-drop-shim might work. The game now needs some logic for reformats and maybe buttons to trigger it.

jberglinds commented 7 years ago

The polyfill seems to be working but sometimes the dragImage get offset wrongly. Now included from node_modules, we should probably look into using some system for managing libs.