HOME ➔ SUPPORT ➔ Community ➔ General CourseLab issues ... Restricting Drag and Drop items from leaving screen
Restricting Drag and Drop items from leaving screen
  View type:
I have built my drag & drop page and have noticed that if you drag the item off the page it dissapears with no way to get it back.

Silly thing to do I know, but is there anyway that you can restrict drag & drop items from leaving the screen or returning the item to its original position if it does?
 
You could add a checking loop after the drop to check the object is within the page.
That would be on the lines of if it's less than 0 in either x,y or more than the page bounds x or y move the object back to its origin.
 
 
Hi Nick, firstly thank for your help, on the face of it, it sounds very easy however I'm not sure where the 'if' statement belongs. is it an action on the object being dragged? and if so is this the correct syntax

if 'dragobject_1.x < 0
move-start ......

Regards Raj
Subject:
Message options
No additional options