biigle / core

:large_blue_circle: Application core of BIIGLE
https://biigle.de
GNU General Public License v3.0
12 stars 16 forks source link

Editing rectangle-as-line breaks annotation tool #545

Closed mzur closed 9 months ago

mzur commented 1 year ago

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.

lehecht commented 1 year ago

if the rectangle should be edited

What do you mean with editing? Like using the fill or eraser tool?

mzur commented 11 months ago

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.

mzur commented 10 months ago

Maybe this was fixed by https://github.com/biigle/openlayers/pull/4 (I didn't check)?

lehecht commented 10 months ago

This issue can be closed. It is not possible to draw a rectangle as a line anymore. Duplicated points are discarded and not saved.

lehecht commented 10 months ago

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.

mzur commented 9 months ago

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.