Closed mzur closed 9 months ago
if the rectangle should be edited
What do you mean with editing? Like using the fill or eraser tool?
No, the "regular" editing by grabbing and moving a vertex. Draw a rectangle-line as described above. Then disable the rectangle tool and select the rectangle-line annotation again. When you move the cursor over a vertex, the vertex point appears and can be grabbed and moved. When you do this, the described error occurs.
Maybe this was fixed by https://github.com/biigle/openlayers/pull/4 (I didn't check)?
This issue can be closed. It is not possible to draw a rectangle as a line anymore. Duplicated points are discarded and not saved.
I want to add that it is still possible to create a shape, which looks like a line. Actually you can create a rectangle with e.g a height of 0.000001. Only identical coordinates are deleted.
Thanks. I think the original issue was caused by the handling of identical points in the rectangle that is now changed. Even if the rectangle has a very small height, it now has four points. Editing of the rectangle should work normally then.
It is possible to draw a rectangle as a line (click, draw center line, then click twice on the second point). While this shouldn't be possible in the first place (add validation rules for this!) it doesn't produce an error. However, if the rectangle should be edited, it looks like a triangle/polygon and breaks the entire UI once it should be saved. This should be fixed.