Skip to content

Commit

Permalink
Merge pull request #132 from Smithsonian/dev-bugfix
Browse files Browse the repository at this point in the history
Active tag bug fix.
  • Loading branch information
gjcope authored May 2, 2022
2 parents fdd20e7 + a548454 commit c3ba408
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions source/client/components/CVViewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,11 @@ export default class CVViewer extends Component
});

const views = this.getGraphComponents(CVAnnotationView);
const oldTagCloud = this.outs.tagCloud.value.split(",").map(tag => tag.trim()).filter(tag => tag);
views.forEach(component => {
const annotations = component.getAnnotations();
annotations.forEach(annotation => {
const tags = annotation.tags;
tags.forEach(tag => {
if(!oldTagCloud.includes(tag)) {
this.ins.activeTags.setValue(this.ins.activeTags.value + ", " + tag);
}
tagCloud.add(tag)
});
});
Expand Down Expand Up @@ -314,5 +310,6 @@ export default class CVViewer extends Component

protected onModelLoad(event: IModelLoadEvent) {
this.rootElement.dispatchEvent(new CustomEvent('model-load', { detail: EDerivativeQuality[event.quality] }));
this.refreshTagCloud();
}
}

0 comments on commit c3ba408

Please sign in to comment.