Skip to content

Commit

Permalink
Merge pull request #861 from cornerstonejs/bidirectional
Browse files Browse the repository at this point in the history
fix(bidirectional): Use labels property to show additional labels in bidirectional callout
  • Loading branch information
dannyrb authored Feb 28, 2019
2 parents af3f237 + 1d3f68c commit d6c3647
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/tools/annotation/bidirectionalTool/renderToolData.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit d6c3647

Please sign in to comment.