Closed mark-dce closed 10 years ago
@jcoyne - let me know if you think there are any cases I missed here - I think the rules really cover everything.
How about reordering subcollections within a parent collection?
old: a - b1
\ b2
new: a - b2
\ b1
How about when adding, removing and reordering:
old: a - b1
\ b2
\ b3
new: a - b4
\ b3
\ b5
\ b1
Basically, moved collections should be inserted immediately after the drop target and before any successive images in the collection.
root.members = [new_collection] + root.members
parent_collection.members = [moved_collection] + parent_collection.members
3. Curated collections dragged after another sub collection at the same level should be inserted immediately after the target siblingparent_collection.members = parent_collection.members.insert_after(target_sibling, moved_collection)
(#2 might just be handled as a special case of this where there is no preceding sibling)