Skip to content

sv-placeholder for sortable lists without common ancestor #139

@punkchen

Description

@punkchen

The sv-placeholder works great for single sortable list. However, when dealing with multiple sortable lists without common ancestor, it's not clear how to apply sv-placeholder such that the size of the partFrom and partTo lists remains unchanged.

Specifically, I have a 2D tile view structured in pseudo HTML below, it's a nested loop, each row is a sortable list. I want to drag a tile from one row to another. When I drag tile 'E' from the second row to the first row, I could get a placeholder at the starting of dragging, but as soon as the tile 'E' is dragged over to the first row, the placeholder disappears, and a new placeholder appears in the first row. What I want during the process is that both rows remain the same size, like auto-resizing.

For example,
A B C D
E F G H

dragging tile 'E', this is happening,
A B C D
"placeholder" F G H
=>
A "placeholder" B C D
F G H

I want ,
A B C D
"placeholder" F G H
=>
A "placeholder" B C
D F G H

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions