Skip to content

fix: Fixes an edge case and formatting.#1450

Open
willum070 wants to merge 5 commits into
mainfrom
fix-3d-camera-position
Open

fix: Fixes an edge case and formatting.#1450
willum070 wants to merge 5 commits into
mainfrom
fix-3d-camera-position

Conversation

@willum070
Copy link
Copy Markdown
Collaborator

@willum070 willum070 commented May 12, 2026

This PR does the following things:

  • Fixes an edge case where adjusting tilt sent a negative number, resulting in a freeze. Values are now clamped.
  • Updates the formatting of the bootloader in the HTML file to conform to standards.

@willum070 willum070 requested a review from chrisjshull May 12, 2026 16:56
@willum070 willum070 force-pushed the fix-3d-camera-position branch from d05b57c to cf4c1c0 Compare May 12, 2026 19:05
@willum070 willum070 changed the title fix: Fixes incorrectly formatted bootloader. fix: Fixes an edge case and formatting. May 12, 2026
willum070 added 2 commits May 12, 2026 12:24
Removing since it's impossible to get a negative value here.
>
<label for="tilt">
Tilt: <span id="tilt-val">45</span>&deg;
</label>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

non-blocking - but there are a few other cases of this in this file, if you want

altitude: currentCenter.altitude,
};
}
} else if (prop === 'altitude') {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

seeing as there is an established "special case" pattern see with eh if-elses, consider instead handling tilt in that way

...
else if (prop === 'tilt') {
            map3DElement.tilt = Math.max(0, val);
        } else ...

and leave the final else as a purely generic catch-all

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