feat(viewer): per-level base elevation parameter#312
Open
mvanhorn wants to merge 1 commit into
Open
Conversation
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.
What does this PR do?
Adds a per-level
baseElevationparameter so each level can offset its computed stack position upward by a user-specified amount. The site panel surfaces aBase elevationMetricControl on each level (m, 2dp, 0.05 step) and the viewer's level system threads the offset throughgetLevelTargetY/getNextLevelCumulativeYhelpers.How to test
Base elevationfield to a non-zero meter value.EXPLODED_GAPstill adds on top of the cumulative offset.bun test packages/core/test/level.test.ts packages/viewer/test/level-utils.test.ts.Notes
check-typesflags a pre-existing TypeScript error on the base branch unrelated to this change (packages/editor/src/store/use-editor.tsx:249—childIdimplicit any). The error is present onorigin/mainbefore this branch is applied, so the failure isn't introduced by this PR. Happy to fix it in a sibling PR if useful.Checklist
bun devand exercised the change locallybun check(biome clean)bun check-typesfails on pre-existing error (see Notes)mainCloses #209