Have annotations work with domain objects that have dots (#7065)

* migrating to new structure - wip

* notebooks work, now to plots and images

* resolve conflicts

* fix search

* add to readme

* spelling

* fix unit test

* add search by view for big search speedup

* spelling

* fix out of order search

* improve reliability of plot tagging tests
This commit is contained in:
Scott Bell
2023-09-21 22:50:08 +02:00
committed by GitHub
parent 05c7a81630
commit 482f1f68dd
19 changed files with 257 additions and 140 deletions

View File

@@ -94,10 +94,10 @@ export default {
return this?.selection?.[0]?.[0]?.context?.item;
},
targetDetails() {
return this?.selection?.[0]?.[0]?.context?.targetDetails ?? {};
return this?.selection?.[0]?.[0]?.context?.targetDetails ?? [];
},
shouldShowTagsEditor() {
const showingTagsEditor = Object.keys(this.targetDetails).length > 0;
const showingTagsEditor = this.targetDetails?.length > 0;
if (showingTagsEditor) {
return true;
@@ -106,7 +106,7 @@ export default {
return false;
},
targetDomainObjects() {
return this?.selection?.[0]?.[0]?.context?.targetDomainObjects ?? {};
return this?.selection?.[0]?.[0]?.context?.targetDomainObjects ?? [];
},
selectedAnnotations() {
return this?.selection?.[0]?.[0]?.context?.annotations;
@@ -167,9 +167,8 @@ export default {
this.unobserveEntries = {};
this.selection = selection;
const targetKeys = Object.keys(this.targetDomainObjects);
targetKeys.forEach((targetKey) => {
const targetObject = this.targetDomainObjects[targetKey];
this.targetDomainObjects.forEach((targetObject) => {
const targetKey = targetObject.keyString;
this.lastLocalAnnotationCreations[targetKey] = targetObject?.annotationLastCreated ?? 0;
if (!this.unobserveEntries[targetKey]) {
this.unobserveEntries[targetKey] = this.openmct.objects.observe(