sheleoni / icecream-kana-game

A game for learning Japanese characters in the form of collecting ice-cream scoops. 🍦
https://icecream.sheleoni.com/
1 stars 0 forks source link

research: how to allow a drag and drop area for /collection route ✍️ #82

Open sheleoni opened 9 months ago

sheleoni commented 9 months ago

research what libraries also try to learn how drag and drop works in vanilla JS

dump area draft 1

Steps

Possible difficulties

Documenting the possible libraries / drag and drop approaches in the comments

sheleoni commented 9 months ago

basic drag and drop done at https://github.com/sheleoni/icecream-kana-game/pull/84 CleanShot 2023-12-26 at 22 20 09

sheleoni commented 9 months ago

multiple drag and drop done at https://github.com/sheleoni/icecream-kana-game/pull/85 multiple scoop drag

maybe the next step is to attach the object _id to the iceCream collection array and delete it from the iceCreamCollection array when the user has dragged it in to the dump. Or, without the _id, just identify the ice-cream by its name property and delete the corresponding quantity from the iceCreamCollection after dragging into drag area and pressing some form of submit