function selectSingle(that) { let api = bimSelectionDlgApi; api.Public.clearHandler(); api.Feature.getByEvent(true, (n) => { if (n && n["id"]) { let featureId = n.id; let modelId = featureId.split("^")[0]; if(that.selectItems.includes(featureId)){ api.Feature.setColor(featureId, "rgba(255,255,255,1)"); let index = that.selectItems.indexOf(featureId); if (index > -1) { that.selectItems.splice(index, 1); } }else{ api.Feature.setColor(featureId, "rgba(255,0,255,1)"); that.selectItems.push(featureId); } } }); } export default { selectSingle, };