Horizontal Drag and Drop + Reorder

newbie-question

#21

@mbc66, thanks for doing this, unfortunately I tried to use @josephxbrick solution you edited but it doesn’t seem to work. See the gif attached. Is it working on your machine? What browser are you using to see it?

x


#22

I’m using Windows 10 and just tested this on latest versions of Chrome, Firefox, and Edge browsers. It worked correctly on all (although clunky and slow on Edge.)

I put this up on AxShare here: https://bope9k.axshare.com/

  • I tested it with no problems on Windows and Mac (OSX Sierra) with Safari and Chrome.

  • So, looks to me like this is a bug in the Mac version of Axure.

See the version posted earlier in this thread: Horizontal_DragandDrop_reorder 2.rp and the discussion about the use of “This.property” versus a local variable. I thought I had started with that version, but I guess I did not. You should be able to update my code fairly easily by following josephxbrick’s instructions in this thread. Let me know if you still need help with that.


#24

Hi mbc66,

it dosent work well when im changing the height of one of the row.
do you have a solution for this problem?

this is how it look in you edited file:

and this is the outcome:

Thanks
Yary


#25

@Kyary,

This basic “list sorting algorithm” does have a constraint that all items have the same size (or at least same height when sorting vertically.) To handle varying heights, we must keep track of the height of the dragging item as well as the height of the item that needs to slide up or down, so that the drop locations are correct.

Here is a solution. It works for me on Win10+Chrome 71.
H_or_V_DragandDrop_reorder.rp (500.7 KB)


#26

Thank you very much its was very helpful


#27

Hi @mbc66,

Apologies if this has already been answered, but is there a way to combine both the horizontal and verticle drag and drop function together so you can move the tiles in all directions…? I’ve attached an image - hopefully it makes sense. 23%20AM

Thank you,

JEY


#28

@josephxbrick thanks a lot! That is just amazing… how do I make it work vertically?

A Thousand thanks!