Skip to content

fix(atlas): make the viewport lock clickable + inspector switch#218

Merged
JumpLink merged 1 commit into
mainfrom
fix/atlas-lock-toggle
Jun 12, 2026
Merged

fix(atlas): make the viewport lock clickable + inspector switch#218
JumpLink merged 1 commit into
mainfrom
fix/atlas-lock-toggle

Conversation

@JumpLink

Copy link
Copy Markdown
Contributor

The lock toggle never received clicks: the scene card is a
Gtk.Button whose click gesture runs in the CAPTURE phase, so the
nested ToggleButton's press was claimed by the card. The card now
detects lock presses itself (the drag gesture already picks the
press target) and toggles the lock from its own clicked handler,
suppressing the host's select via the existing idle-reset window.

The scene inspector additionally mirrors the lock as a switch row
('Pan preview section') for the selected map — synced both ways
with echo guards (card toggle -> switch, switch -> card).

The lock toggle never received clicks: the scene card is a
Gtk.Button whose click gesture runs in the CAPTURE phase, so the
nested ToggleButton's press was claimed by the card. The card now
detects lock presses itself (the drag gesture already picks the
press target) and toggles the lock from its own clicked handler,
suppressing the host's select via the existing idle-reset window.

The scene inspector additionally mirrors the lock as a switch row
('Pan preview section') for the selected map — synced both ways
with echo guards (card toggle -> switch, switch -> card).
@JumpLink JumpLink merged commit 239075a into main Jun 12, 2026
1 check passed
JumpLink added a commit that referenced this pull request Jun 12, 2026
…219)

No behaviour change — the preview/card pair grew through several
review iterations (#214-#218); this consolidates:

map-preview:
- constants moved above the class JSDoc so it documents the class
- cache key derived forward (_cacheKeyBase + _cacheKey()) instead of
  string-parsing the composed key backwards; the stored-key field is
  gone — _runBake computes the key when it stores
- _bakedCenter folded into _viewportBake (single last-viewport-bake
  record; _baked stays the is-current marker for both modes)
- _clampCenter takes the widget extent instead of a horizontal flag
- _populateFromMap renamed _setSource (no key parameter anymore)

scene-card:
- _moveDeltaInParent extracts the parent-space delta math that was
  duplicated between drag-update and drag-end
- _suppressTrailingClick extracts the idle-reset click suppression
  shared by drag-end and the lock-click handler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant