Skip to content

Commit

Permalink
Support showing data from subkeys in annotation lists.
Browse files Browse the repository at this point in the history
  • Loading branch information
manthey committed Jul 13, 2023
1 parent 3ae6bc3 commit d5f5051
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Allow editing metadata in item lists ([#1235](../../pull/1235))
- Frame selector hotkeys for channel or bands ([#1233](../../pull/1233))
- More consistency in how local and remote image conversions are performed in Girder ([#1238](../../pull/1238))
- Support showing data from subkeys in annotation lists ([#1241](../../pull/1241))

## 1.23.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,18 @@ if annotations.length
for column in confList.columns || []
if column.type !== 'record' || column.value !== 'controls'
-
var value = (column.type === 'record' ? annotation.get(column.value) || annotation.get('annotation')[column.value] : (column.type === 'metadata' ? ((annotation.get('annotation').attributes || {})[column.value] || '') : '')) || '';
var value;
if (column.type === 'record' && column.value === 'creator') {
value = creator;
}
if (column.type === 'record' && column.value === 'updatedId') {
} else if (column.type === 'record' && column.value === 'updatedId') {
value = updater;
} else if (column.type === 'metadata') {
value = annotation.get('annotation').attributes || {};
column.value.split('.').forEach((part) => {
value = (value || {})[part];
});
} else {
value = column.type === 'record' ? annotation.get(column.value) || annotation.get('annotation')[column.value] : '';
}
td.g-annotation-entry(title=value)
if column.format === 'user'
Expand Down

0 comments on commit d5f5051

Please sign in to comment.