-
Notifications
You must be signed in to change notification settings - Fork 35
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
Update SnapGeometryEdits #201
Conversation
Add graphics overlay UI
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.
LGTM (haven't done a super in-depth review though)
SetupSnapSourceUI(snapSourceList, isSnapSourceEnabled, onSnapSourceChanged, GeometryType.Point) | ||
SetupSnapSourceUI(snapSourceList, isSnapSourceEnabled, onSnapSourceChanged, GeometryType.Polyline) | ||
SetupSnapSourceUI(snapSourceList, isSnapSourceEnabled, onSnapSourceChanged, null) | ||
} |
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.
Nice 👍
Hi @shubham7109, can you please review? Thanks. |
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.
Changes LGTM. One naming change, but no need to re-review.
There is one preexisting bug in this sample that I found, which your changes haven't caused. If I start creating a geometry but never tap on the map, then want to cancel, pressing the delete icon doesn't work, I can only stop by pressing the save icon. That's a bit unintuitive but not a huge deal.
} | ||
|
||
@Composable | ||
fun SetupSnapSourceUI( |
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.
Better to make this a noun, ie. SnapSourceUI
Thanks for the quick review @hud10837. I made a fix to the delete button as per your observation. We should be ready to merge now. |
Description
This update fixes a casting issue in the sample given snap sources can now be graphics overlays. Additionally, the UI has been reworked to reduce code and updated to include a section to enable snapping to the graphics overlay.
Notes:
SnapSettingsScreen
is hidden underneath the scaffoldtopBar
with the addition of the graphics overlay UI section. A workaround was to move theSampleTopAppBar
to within the Scaffold contents so that theSnapSettingsScreen
appears above the sample title.Links and Data
Update Design PR
What To Review
README.md
andREADME.metadata.json
filesHow to Test
Run the sample on the sample viewer or the repo.