Snapping and positioning of objects on targets

Sep 05, 2019

Looking for help with a drag and drop interaction I am developing. I have multiple texts to be dragged from one  column that either belong to column 2 or 3. I would like to designate for column 2 as correct or some and column 3 as correct for others. If an item is dragged anywhere onto the right column, I would like it snapped to a position on top of the column. The second correct item would be snapped and aligned underneath it.

What I have succeeded in achieving is placing the items only if placed in their right positions. They do not snap into place if dragged anywhere else onto the right column.

Help would be much appreciate

MN

4 Replies
John Morris

I think I understand what you are asking, please forgive me if I have misunderstood.

If you are using a freeform drag and drop you will find these settings in the Drag and Drop Options (see attachments).  The option that would be the closest to what you are looking for would be "Tile."  But this setting will place the drop items next to each other until the width of the target is filled.  You may, however, make the drop target narrow enough, or the drop item wide enough, that two drop items will not fit side by side and then they would be forced to snap one below the other.

You mention that you are using texts as drop items.  I find it easier to judge the size of a shape that contains text when setting up something like this.

 

 

Mohamed Noorani

Many thanks John. The snapping is working absolutely fantastic following the directions you kindly shared. I added a hotspot over each of the columns and placing the text shape any where on the columns snaps it in the right position in the correct column. Now I need to figure out how to achieve this if the object is placed in the correct column only and snap back to its predragged position if placed in the wrong column.

This discussion is closed. You can start a new discussion or contact Articulate Support.