Skip to content

refactor(gjs): tidy map-preview + scene-card after the atlas rounds#219

Merged
JumpLink merged 1 commit into
mainfrom
refactor/atlas-preview-cleanup
Jun 12, 2026
Merged

refactor(gjs): tidy map-preview + scene-card after the atlas rounds#219
JumpLink merged 1 commit into
mainfrom
refactor/atlas-preview-cleanup

Conversation

@JumpLink

Copy link
Copy Markdown
Contributor

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

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
@JumpLink JumpLink merged commit d1f81ba into main Jun 12, 2026
1 check passed
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