Count measurement Tool - multiple counters

Hi Michael,

You can do it with the following code added to your application:

const { annotationManager } = instance.Core
annotationManager.addEventListener('annotationSelected',(annotList, action)=>{
    if (annotList.length === 1 && action ==='selected' && annotList[0].ToolName.includes('AnnotationCreateCountMeasurement')) {
        var overlayEl = ins.docViewer.getViewerElement().closest('#app').getElementsByClassName('measurement__count')[0];
        // Text can be in other languages so need to get this first
        const text = overlayEl.textContent.split(':')[0];
        overlayEl.textContent = `${text}: ${annotationManager.getAnnotationsList().filter(annot=> annot.ToolName === annotList[0].ToolName).length}`
    }
})