Skip to content

Drag and drop across separate layout scopes (Placed) #85

Open

Description

@samitbasu

Found while building production in-app DnD (#33). A drag gesture belongs to the Placed (layout scope) whose source started it, and drop targets laid out by another Placed on the same egui context don't see it. Apps that lay out separate panels as separate eggshell trees can't drag between them. Examples: an assets panel onto a canvas, or a sidebar list into a main view.

Shape to decide: one gesture per egui context, with each Placed contributing its targets (final rects, paint order, layer) to a context-wide resolver at draw time, resolved once after all of them have drawn. That's the same "one resolver over final rects" rule, lifted from one Placed to the context. It interacts with M6 overlays: a popover or sheet is a separate layer and probably a separate Placed.

Tests: a drag from a source in one Placed onto a target in another, the innermost/topmost rule across them, and continuity throughout.

Activity

  1. samitbasu commented on Nov 11, 2026

    @samitbasu
    OwnerAuthor

    Priority input: the reference shell lays out its whole window as one tree per frame (top bar, rail, sidebar panels, canvas as a custom node, properties, status), so its Assets/Parts → canvas drags stay within one tree and don't need this. The case to watch is M6: if overlays (popovers, sheets) end up as separate trees, a drag into or out of an overlay crosses trees. Decide #85's shape as part of M6's overlay design, not after it.

  2. samitbasu commented on Nov 11, 2026

    @samitbasu
    OwnerAuthor

    M6 design (PR #101): overlays live in the same Placed, so this issue isn't an M6 dependency. It stays open for drags across separate Placed; Placed::root_at is the piece to lift to the context if it's built.

  3. added
    post-0.1
    on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    post-0.1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions