Skip to content

fix(control-custom-state): rename button variables and add DEMO_MAP_ID - #1746

Open
willum070 wants to merge 1 commit into
mainfrom
control-custom-state-fix
Open

willum070 wants to merge 1 commit into
mainfrom
control-custom-state-fix

Conversation

@willum070

Copy link
Copy Markdown
Collaborator

Co-authored by @zigzag. Thanks for finding this fix and submitting PR #1734! This PR patches the changes so that our internal processes can be run.

Issue:

The two button variable names in samples/control-custom-state/index.ts were swapped relative to their actual behavior. setCenterButton was bound to btnCenterMap (the button that recenters the map) but only applies the stored center, so it doesn't "set" anything.
resetCenterButton was bound to btnSetCenter (the button that stores the current center) but is the one that actually stores it, so it doesn't "reset" anything.

Changes made:

  1. Renamed setCenterButton to centerMapButton (bound to btnCenterMap)
  2. Renamed resetCenterButton to setCenterButton (bound to btnSetCenter)
  3. Updated only identifiers to match the HTML ids/labels and what each click handler actually does. No behavior change.

Change-Id: I99ba8df327b6c168c15e51b3e09889687870db68

Change-Id: I99ba8df327b6c168c15e51b3e09889687870db68
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