Skip to content

canvy: a pan lands on a hive rect and relocates the whole subtree — and the accident pins every auto-laid cell forever #415

Description

@mmeyerlein

Observed on a live display, reconstructed from the stored positions afterwards.

What happened

On a dense picture there is almost no empty background left: hive rects carry pointer-events: all and the outermost hive covers nearly the whole stage. A drag that was meant as a pan grabbed the outermost hive instead and moved it — measured afterwards as a uniform shift of every stored node position by the same vector (here: −541, −179). Combined with #414 (the burst of per-member writes drops frames), the person doing it does not even see a clean result: the picture half-follows, snaps around, and settles wrong.

The second half is worse than the first

A hive drag writes x/y into every member, including the ones that had no stored position. From that moment those cells are hand-placed as far as saved_positions is concerned — the flow layout will never touch them again, and there is no way to un-pin: object.update merges per key and cannot remove one. Recovery meant deleting the node objects outright so the next tick recreates them without positions. An accidental gesture should not need surgery to undo.

Also downstream of the same accident: the auto-laid cells of a sibling hive (grown later, settled against the pre-accident picture) ended up overlapping the shifted hand-placed cells — 12 node-node overlaps on a 59-cell colony. In an overlap the topmost box eats the pointer, so grabbing 'the node I see' moves a different one: reported as "I move a node and it springs back".

Directions, for a ruling

  1. Make the group drag deliberate. A hive moves only by its label (or with a modifier held); a drag starting on a hive's fill pans the camera. The label is small and unambiguous; the fill is what a pan naturally lands on.
  2. Make it undoable. Either an explicit un-pin (an editable-prop delete, or a canvy gesture that clears x/y), or make the group drag write one record instead of pinning every member — though the per-member record is exactly what GH canvy: adding a cell moves every hand-placed hive, because a hive anchor is a delta against the computed layout #170 chose, so this arm reopens that ruling and needs care.
  3. Optionally: treat members that had no stored position specially on a group drag — move them provisionally but do not write them, so the accident stays shallow.

(1) plus an un-pin from (2) looks like the honest pair; (3) is cheap but makes a group drag's result depend on invisible state.

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