From 1d3f68c8e330e5d467c327695e29958d938c090e Mon Sep 17 00:00:00 2001 From: Evren Ozkan Date: Wed, 27 Feb 2019 15:55:54 -0500 Subject: [PATCH] fix(bidirectional): Use labels property to show additional labels in bidirectional callout --- .../annotation/bidirectionalTool/renderToolData.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/tools/annotation/bidirectionalTool/renderToolData.js b/src/tools/annotation/bidirectionalTool/renderToolData.js index 888bc11a4..d014ccc33 100644 --- a/src/tools/annotation/bidirectionalTool/renderToolData.js +++ b/src/tools/annotation/bidirectionalTool/renderToolData.js @@ -109,12 +109,7 @@ export default function(evt) { handles.perpendicularStart, handles.perpendicularEnd, ]; - let textLines = getTextBoxText(data, rowPixelSpacing, colPixelSpacing); - - if (data.additionalData && Array.isArray(data.additionalData)) { - textLines = data.additionalData.concat(textLines); - } - + const textLines = getTextBoxText(data, rowPixelSpacing, colPixelSpacing); drawLinkedTextBox( context, element, @@ -173,8 +168,9 @@ const getTextBoxText = (data, rowPixelSpacing, colPixelSpacing) => { const lengthText = ` L ${data.longestDiameter}${suffix}`; const widthText = ` W ${data.shortestDiameter}${suffix}`; - if (data.lesionNamingNumber) { - return [`Target ${data.lesionNamingNumber}`, lengthText, widthText]; + const { labels } = data; + if (labels && Array.isArray(labels)) { + return [...labels, lengthText, widthText]; } return [lengthText, widthText];