Skip to content

Implement collision detection for cards #7

@cauebs

Description

@cauebs

Currently to drop a card on top of another your cursor must be over it. If you grab a card near one of its edges this can result in a very surprising behavior (when both cards are overlapping quite a bit but your cursor is still not over the one behind, you release the mouse button and the move fails, returning the dragged card to its original position).

This might be not too complicated to solve. Move the onmouseup event to the root SVG element, use the functions from the layout module to figure out the bounding boxes of both the dragged card and the topmost card on every column, some simple maths et voilà.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions