Problems related to HTML5 drag-and-drop constraints

excuse me, how should I write the html5 drag-and-drop constraint? For example, if you don"t want to drag something out of the frame, here are two pictures. What should I do with this?

if you can"t constrain the area of drag and drop, then start with the method of drag and drop. I"m trying, and I"d like to ask all of you for advice

Mar.04,2021

I've thought about this before, but it didn't work out.

you can only set where you can put it and which you can't.
the mouse graphics where they can be placed are different from those where they cannot be placed.
there is no way to constrain the bounds to which the mouse drags it.

however, we can wait and see if others have a good solution.


this problem has been solved. I will sort out and publish an article later. Thank you for your attention. Please look forward to

.
Menu