Skip to content

Add more descriptive element labels#216

Merged
naglepuff merged 6 commits intomasterfrom
element-names
Aug 3, 2022
Merged

Add more descriptive element labels#216
naglepuff merged 6 commits intomasterfrom
element-names

Conversation

@naglepuff
Copy link
Copy Markdown
Contributor

Resolves #195

This PR creates more descriptive element labels for annotations listed in the draw widget. In addition to the element type, for point, rectangle, ellipse, circle and polyline elements, the group name of the element and a number is added to the element label.

If an element is assigned a new group when edited, the label is updated to reflect the new group.

The number corresponding to each element is just a counter that starts at 1 and counts up for each element in the annotation. It is not a long-term ID for the element, and more of a way to more easily differentiate between two elements in the list. New elements added to the annotation (e.g. by being drawn on) are assigned a number as well. When the page is refreshed, the numbers are recalculated. This design might not be optimal and is intended to be a starting point.

@manthey
Copy link
Copy Markdown
Contributor

manthey commented Jul 29, 2022

This is good. The only consideration is that for non-geometric annotations (images, superpixels, heatmaps), often there is only one so showing something like "image 1" seems less desirable than "image". My recommendation is for non-geometric annotations, don't add " 1" if there is only one element.

Now, the first pixelmap, heatmap, etc. element won't include a number
as part of its label when listed in the draw widget. Subsequent elements
of the same type will have a number.
@naglepuff
Copy link
Copy Markdown
Contributor Author

In a9508f0 I've modified it so the first non-geometric element of each type in an annotation has no number in its label.

@naglepuff naglepuff merged commit e29b994 into master Aug 3, 2022
@naglepuff naglepuff deleted the element-names branch August 3, 2022 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default annotation element name

2 participants