Description
Module
- deck.gl-community/arrow-layers
- deck.gl-community/bing-maps
- deck.gl-community/editable-layers
- deck.gl-community/experimental
- deck.gl-community/graph-layers
- deck.gl-community/layers
- deck.gl-community/react
- deck.gl-community/react-graph-layer
Description
When preventOverlappingLines
is set to true
, DrawPolygonMode
prevents placing new vertices that overlap with the polygon. However, it is possible to create a self-intersection that is not detected, as demonstrated here:
Screencast.from.2024-11-20.06-35-51.webm
Notice that the polygon was successfully created, despite it having a self-intersection. This is because the current implementation doesn't check for intersection of the closing line segment of the polygon (between the last placed vertex, and the first vertex).
Expected Behavior
The self-intersection created above shouldn't be possible when preventOverlappingLines
is turned on. Intersection needs to be checked on the final line segment.
Steps to Reproduce
See screen capture above - with preventOverlappingLines
turned on, it is still possible to create a self-intersecting polygon.
Environment
- Framework version: [email protected]
- Browser: Chrome (latest)
- OS: Ubuntu
Logs
No response