How i can delete annotation from one screen? Because nothing is happening in my code. When i using annotation.state.removeAllAnnotations() all worked, but cleared from all screens
- Which OHIF version you are using?
1.84
const clearAnnotation = (viewportId, viewportElement) => {
toolGroup = ToolGroupManager.getToolGroup(TOOL_GROUP_NAME);
console.log('toolGroup', toolGroup);
console.log('viewportId', viewportId);
console.log('annotation', annotation);
console.log('annotation.state', annotation.state);
const toolName = 'Length';
const annotations = annotation.state.removeAnnotation(toolName, viewportId);
console.log('annotation.state.getAnnotations', annotations);
//worked
//annotation.state.removeAllAnnotations();
};