DEV Community

Discussion on: Need help / suggestions on a project

gac profile image
Igor Ilic Author

I've implemented the click functionality and everything that needs to come after that. So that each waiter can have their own table(s) and tabs on them.

But the problem mostly arrives when the admin wants to change the position of tables, move them freely around the screen and have them saved in that position. And I'm not sure if I can use the mouse X/Y cords due to the resolutions to use it as a center of block and draw around it and than store it like that in the db.

nanohard profile image
William Antonelli

Don't bother with drag and drop, can just click on the grid area and have a modal with add/remove.

elfalem profile image

You can use the mouse DOM coordinates. You just have to make sure you translate them into SVG coordinates. You may find these links helpful: