Skip to content
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

New polygon snap tool #143

Merged
merged 3 commits into from
Apr 27, 2023
Merged

New polygon snap tool #143

merged 3 commits into from
Apr 27, 2023

Conversation

dabreegster
Copy link
Contributor

#118

screencast.mp4

For now, the new tool is distinct from the previous freehand polygon tool. In the future, we could try to merge the two, allowing easy freehand points alongside snapping. But for now, it's too tough.

As a note, this was a super quick change to crank out, because TS had my back. I had one or two bugs (forgetting to glue something up) and the compiler told me. I'm very happy with the decision to use it.

@@ -6,7 +6,7 @@

// TODO Save this in the route
let avoidDoublingBack = false;
$: routeTool.setConfig({
$: routeTool.setRouteConfig({
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sliiight bug here. If we make a snapped area, then make a snapped route, avoid doubling back will be true from the last call, but the checkbox won't be ticked. I think we need to add a property to the output geojson feature to indicate this option and keep it synced.

@dabreegster dabreegster merged commit 5d0e927 into main Apr 27, 2023
@dabreegster dabreegster deleted the area_snap branch April 27, 2023 13:44
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.

1 participant