Repository navigation
Conversation
The variables were swapped relative to their actual behavior and the HTML ids/labels they're bound to: setCenterButton was wired to btnCenterMap and recentered the map, while resetCenterButton was wired to btnSetCenter and stored the current center. Renamed to centerMapButton/setCenterButton to match what each one actually does.
willum070
approved these changes
Oct 20, 2026
willum070
left a comment
Collaborator
There was a problem hiding this comment.
Great suggestion, thanks!
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.
Summary
The two button variable names in
samples/control-custom-state/index.tswere swapped relative to their actual behavior.setCenterButtonwas bound tobtnCenterMap(the button that recenters the map) but only applies the stored center, so it doesn't "set" anything.resetCenterButtonwas bound tobtnSetCenter(the button that stores the current center) but is the one that actually stores it, so it doesn't "reset" anything.What I have done
setCenterButtontocenterMapButton(bound tobtnCenterMap)resetCenterButtontosetCenterButton(bound tobtnSetCenter)Test Plans
npx tsc --noEmitto confirm the sample still type-checksbtnCenterMapandbtnSetCenterids are unchangedTest Results
npx tsc --noEmitpassed with no errors