Skip to content

Commit

Permalink
cleanup + fix tag display for annotation (using description instead o…
Browse files Browse the repository at this point in the history
…f identifier when present)
  • Loading branch information
chrisj committed Aug 22, 2024
1 parent bbf8308 commit 9695a36
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/ui/annotations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import {
AnnotationType,
annotationTypeHandlers,
formatNumericProperty,
isAnnotationNumericPropertySpec,
} from "#src/annotation/index.js";
import {
AnnotationLayer,
Expand Down Expand Up @@ -1771,10 +1772,14 @@ export function UserLayerWithAnnotationsMixin<
const property = properties[i];
const value = annotation.properties[i];

if ((property as any).tag) {
// TODO fix
if (value === 1) {
activeTags.push(property.identifier);
if (
isAnnotationNumericPropertySpec(property) &&
property.tag
) {
if (value !== 0) {
activeTags.push(
property.description || property.identifier,
);
}
continue;
}
Expand Down

0 comments on commit 9695a36

Please sign in to comment.