Rapid icon indicating copy to clipboard operation
Rapid copied to clipboard

Change snap target of areas from fills to outlines.

Open Bonkles opened this issue 3 years ago • 1 comments

Currently, the renderer for polygons draws both an outline and an area fill. The fill depends on whether we are using wireframe mode, partial fill mode, or full-fill mode:

https://user-images.githubusercontent.com/1887955/207692685-9a3b5bf9-be71-42e1-b7ac-54d1a6b11a31.mov

As of right now- only the fills are targetable for node snapping. This needs to be changed- we should allow only the outlines to be snapped/connected to, but that's not ready yet.

Here's an example of what this looks like when trying to add a new node to a polygon:

https://user-images.githubusercontent.com/1887955/207693217-f4c1e3d4-5725-4ca6-a03d-5b27ead13751.mov

The behavior here is not intuitive- the node is being snapped to the edge of the polygon since RapiD thinks the way is being 'snapped' to.

Bonkles avatar Dec 14 '22 19:12 Bonkles

I've added a bunch of workarounds in the code that should mostly prevent snapping if the click too far away from the shape's edge. I'll leave the issue open, hoping to add a less hacky fix later.

bhousel avatar Feb 08 '23 17:02 bhousel