mirror of
https://github.com/nasa/openmct.git
synced 2025-03-18 10:05:22 +00:00
need to add image indicator
This commit is contained in:
parent
5fb78a9604
commit
7a808622ae
@ -138,33 +138,12 @@ export default {
|
||||
targetDomainObjects[keyString] = this.domainObject;
|
||||
|
||||
const targetDetails = {};
|
||||
const uniqueBoundsAnnotations = [];
|
||||
annotations.forEach(annotation => {
|
||||
Object.entries(annotation.targets).forEach(([key, value]) => {
|
||||
targetDetails[key] = value;
|
||||
});
|
||||
|
||||
const boundingBoxAlreadyAdded = uniqueBoundsAnnotations.some(existingAnnotation => {
|
||||
const existingTime = Object.values(existingAnnotation.targets)[0].time;
|
||||
const newTime = Object.values(annotation.targets)[0].time;
|
||||
if (existingTime !== newTime) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const existingBoundingBox = Object.values(existingAnnotation.targets)[0].rectangle;
|
||||
const newBoundingBox = Object.values(annotation.targets)[0].rectangle;
|
||||
|
||||
return (existingBoundingBox.x === newBoundingBox.x
|
||||
&& existingBoundingBox.y === newBoundingBox.y
|
||||
&& existingBoundingBox.height === newBoundingBox.height
|
||||
&& existingBoundingBox.width === newBoundingBox.width);
|
||||
|
||||
});
|
||||
if (!boundingBoxAlreadyAdded) {
|
||||
uniqueBoundsAnnotations.push(annotation);
|
||||
}
|
||||
});
|
||||
this.selectedAnnotations = uniqueBoundsAnnotations;
|
||||
this.selectedAnnotations = annotations;
|
||||
this.drawAnnotations();
|
||||
|
||||
return {
|
||||
|
Loading…
x
Reference in New Issue
Block a user