Skip to content

Add Scalebar preview (#976)#1459

Open
sainadth wants to merge 1 commit into
Esri:mainfrom
sainadth:sainadth/976-add-scalebar-preview
Open

Add Scalebar preview (#976)#1459
sainadth wants to merge 1 commit into
Esri:mainfrom
sainadth:sainadth/976-add-scalebar-preview

Conversation

@sainadth

@sainadth sainadth commented Jun 3, 2026

Copy link
Copy Markdown

Summary

This PR adds a #Preview to Scalebar.swift to allow quick visual validation of changes without needing to build and run the full app, addressing issue #976 .

What changed

  • Added a #Preview block to Scalebar.swift
  • Seeds required map state (spatialReference, unitsPerPoint, viewpoint) via .onAppear
  • Includes a Picker to interactively switch between all five ScalebarStyle cases

Why this change

  • Removes the need to build and run the full app to validate visual changes
  • Scalebar has no internal state, so map inputs must be seeded manually in the preview
  • Enables faster iteration without any network or map dependency

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