geojs
geojs copied to clipboard
Annotation drawing improvements
- [x] Allow continuous (freehand) drawing for polygons
- [x] Optionally prevent polygons and lines from self-crossing during creation. This could be accomplished by disallowing points that would self cross or by creating vertices at the crossing point(s) so that the polygon can be uncrossed. Disallowing points that lead to self-crossing is probably more obvious, but it might not be obvious why you can't close a polygon if only the closure leads to self-crossing.
- [ ] Use rdpSimplify in continuous drawing mode to remove nearly colinear points.
The polygon boolean operations largely address this. We probably should self-union polygon annotations on close.
Update: Added in #1236.
Actual colinear points will be removed by the polybool union operation.