add support for data annotations

This commit is contained in:
j 2026-01-12 22:30:54 +00:00
commit 8243614546
5 changed files with 77 additions and 34 deletions

View file

@ -247,13 +247,13 @@ Ox.AnnotationPanel = function(options, self) {
if (annotation && folder) {
key = folder.options('id');
type = folder.options('type');
value = annotation.entity ? annotation.entity.name : annotation.value;
value = type == 'data' ? '' : annotation.entity ? annotation.entity.name : annotation.value;
isEditable = annotation.editable;
isEntity = !!annotation.entity;
isEvent = type == 'event';
isPlace = type == 'place';
isEventOrPlace = isEvent || isPlace;
isString = type != 'text';
isString = type != 'text' && type != 'data';
// fixme: absence of annotation[type] may be an error
isDefined = isEventOrPlace && !!annotation[type] && !!annotation[type].type;
annotationTitle = folder.options('item') + ': "' + Ox.stripTags(value) + '"';