-
Notifications
You must be signed in to change notification settings - Fork 16
PB-2064: Fix crosshair test #1525
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
base: feat-PB-1383-pinia-store
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a crosshair test by correcting the enum validation logic and adding support for crosshair URL parameters without explicit coordinates.
Key Changes:
- Fixed enum validation in
setCrossHairaction to check enum values instead of enum keys - Added handling for crosshair URL parameters that specify only the type (without coordinates), using map center as the default position
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/viewer/src/store/modules/position/actions/setCrossHair.ts | Fixed the crosshair validation check from crossHair in CrossHairs (which checked for enum keys like 'Point', 'Cross') to Object.values(CrossHairs).includes(crossHair) (which correctly checks for enum values like 'point', 'cross') |
| packages/viewer/src/store/plugins/storeSync/params/crosshair.param.ts | Added else-if branch to handle URL parameters where only the crosshair type is provided without coordinates, ensuring the crosshair is placed at the map center as expected by the test |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bd739c4 to
4716db2
Compare
Test link