buttonwoodcx / bcx-aurelia-reorderable-repeat

An Aurelia repeater supports drag & drop reordering automatically.
https://buttonwoodcx.github.io/doc-bcx-aurelia-dnd/reorderable-repeat
MIT License
19 stars 5 forks source link

option to scroll vertically only #24

Open BooMajka opened 2 years ago

BooMajka commented 2 years ago

Is there an option in aurelia-reorderable that locks to vertical movement only, just like oa-sortable="axis: 'y'" ?

3cp commented 2 years ago

Thx.

I agree it's a good idea to limit the "preview" image movement on the axis of the reordering, that's what native reordering UI does anyway. I would like to offer this as the default behaviour without any option to change.

The only issue I can image is that the UI supports wrapped flex layout, so the items can span more than one column (or row), the preview image would need to snap to closest column under the mouse cursor.

It probably needs to be implemented at lower level, the bcx-aurelia-dnd, I will let you know when it's ready.

If you have more thoughts on this topic, I would love to hear. Cheers!