[Draw area] Don't allow user to draw mis-shapen polygons
Do not allow self-intersecting polygons to be added
@rawbzz @amegantz Should we show a message when "Add point" is tapped and reject the new vertex?
After rejecting the vertex, maybe we show a toast/snackbar and say something like:
- "The edges of an area can't overlap with other edges from the same area"
- "Areas can't intersect with themselves"
- "Area perimeter can't intersect with itself"
WDYT?
- "Area perimeter can't intersect with itself"
I vote for 3, possibly removing the term "area", which we no longer mention during the data collection flow, so:
"Perimeter can't intersect with itself"
Works for me
I have one option where its a popup toast and one thats more like a dialog
I have one option where its a popup toast and one thats more like a dialog
Thanks, @rawbzz. Both options look good, I'm leaning towards the second option since it provides an explicit way of dismissing the message which isn't close to the "Add point" tap target, helping to mitigate accidental taps.
Assuming the 2nd option, I would update the label - the current label sounds like tapping might add a point. Perhaps a simple "Ok" would be better (@amegantz)
agreed i like the second option
Thanks @rawbzz , updated the PR description accordingly.
@anandwana001 To update PR so that check happens when "Add point" or "Continue" are clicked.