refactor(gjs): tidy map-preview + scene-card after the atlas rounds#219
Merged
Conversation
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.
No behaviour change — the preview/card pair grew through several
review iterations (#214-#218); this consolidates:
map-preview:
string-parsing the composed key backwards; the stored-key field is
gone — _runBake computes the key when it stores
record; _baked stays the is-current marker for both modes)
scene-card:
duplicated between drag-update and drag-end
shared by drag-end and the lock-click handler