I want to be able to drag an object without the need to put it in a certain drop area. For instance if I have a couch and I make pillows as an object that can be moved I would like to move them to any area on the scene. The drag and drop doesn’t work because you have to drag and drop it to a certain location.
Right, no actions triggered; solely passive thing. Guess you could get the position of the drag source through js at any given time, and fire actions based on that.
By the way: I noticed that if you manage to push the drag source off-screen on run-time, it snaps back to the last position it had on-screen before the last drag action, so no danger here.
Thanks for confirming. I played a little bit more and here is another restriction. If you add the InBuilt state ‘DragStart’ for the drag source, you are not able to drag it freely. It will snap back to its original position. The other InBuilt states make no sense since there is no Submit ever.
Interesting.
I just realized that you can even delete the Drop Target all together instead of pushing it off-screen. You need to have one initially, or else you can’t uncheck ‘Send Drag Source to original position’, but once that’s done you can delete it, and still be able to drag around the Drag Source(s)
Not so surprised about that since items in the scratch area are not included on publishing, same as a deleted item. It is just easier to have it there since you need to install the link anyway. I was bit surprised about the behavior of the DragStart state however.
Interesting conversation, wished we had more like that in this ‘community’…
About Drag Source not being draggable in DragStart state:
Works just fine for me, provided ‘Send Drag Source to original position’ is unchecked.
BTW, you can also keep the Drop Target on the stage and still be able to drag around the Drag Sources as long as you like, if you just don’t define any correct answer for the D&D interaction (rules out using the wizard for setting up the D&D though).
I did try with the correct option ‘ Send Drag Source to original position’ unchecked, only in Chrome. Always snapped back to the original position when DragStart was created. I didn’t publish, only checked with F11. There was a link to the drop target which was in the scratch area.
I never use the D&D wizard. Neither do I like to have items on the stage which are not used, hence my appreciation for your solution. Always drag the Submit button to the scratch area, never thought about doing it for the drop target.
Make it as a normal drag and drop, but make the drop target very small and change the color/opacity so it cannot be seen and place it in a corner. Do the same for the submit button. It works, I have done this technique several times when the activity is more of a free play activity.
You can make the drop target very large, and edit the Snap feature: choose Absolute to keep the drag source where you drop it on the target. I suspect this to be a Knowledge Check slide, not a scored slide. Do you want the functionality of the Reset button? Are you talking about a responsive or a non-responsive project?
You must be logged in to post a comment.