fix(atlas): make the viewport lock clickable + inspector switch#218
Merged
Conversation
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
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).