Skip to content

Disambiguate and simplify pin logic #396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 6, 2025
Merged

Conversation

tealefristoe
Copy link
Contributor

@tealefristoe tealefristoe commented Jun 4, 2025

This PR disambiguates and simplifies the logic used to determine if a pin is shown or not.

  • pinLatitude, pinLongitude, and pinElevation are used to determine the location of the pin, rather than reusing ventLatitude and ventLongitude.
  • A showPin flag is added to the LavaSimulationStore. When this is true, the pin is shown. When it is false, the pin isn't shown.
  • showPin is only set to true when the user clicks to drop a pin.
  • showPin is set to false when the simulation starts.

It would be better to remove the pin information from LavaSimulationStore and added to UIStore or perhaps a new LavaUIStore, but I didn't bother with that for now. I left a TODO comment about doing this in the future.

@tealefristoe tealefristoe marked this pull request as draft June 4, 2025 17:43
@tealefristoe tealefristoe changed the title Simplify show pin logic. Disambiguate and simplify pin logic Jun 4, 2025
@tealefristoe tealefristoe marked this pull request as ready for review June 5, 2025 12:53
@tealefristoe tealefristoe requested a review from kswenson June 5, 2025 12:53
Copy link
Member

@kswenson kswenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

@tealefristoe tealefristoe merged commit 5458ef4 into master Jun 6, 2025
5 checks passed
@tealefristoe tealefristoe deleted the simplify-pin-display branch June 6, 2025 01:40
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.

2 participants