diff --git a/source/client/components/CVAnnotationsTask.ts b/source/client/components/CVAnnotationsTask.ts index 438e3720..81447966 100644 --- a/source/client/components/CVAnnotationsTask.ts +++ b/source/client/components/CVAnnotationsTask.ts @@ -179,13 +179,15 @@ export default class CVAnnotationsTask extends CVTask { const machine = this._machine; const props = machine.getTargetProperties(); - const orbitIdx = props.findIndex((elem) => {return elem.name == "Orbit"}); - const offsetIdx = props.findIndex((elem) => {return elem.name == "Offset"}); + const retainIdx = []; + for(let i = 0; i < props.length; i++) { + if(["Pivot", "Orbit", "Offset"].includes(props[i].name)) retainIdx.push(i); + } // set non camera properties to null to skip them const values = machine.getCurrentValues(); values.forEach((v, idx) => { - if(idx != orbitIdx && idx != offsetIdx) { + if(!retainIdx.includes(idx)) { values[idx] = null; } });