fix(sr): load existing point, if there is 2nd point in renderableData (Fix rotation in arrow annotation) (#4356)

This commit is contained in:
Joeycho authored and GitHub committed 2024-10-17 09:39:48 -04:00
1 parent 3dd0666c0c
commit 7353f7f069
1 file changed
+8 -1
@@ -230,7 +230,11 @@ export default class DICOMSRDisplayTool extends AnnotationTool {
// This gives us one point for arrow
canvasCoordinates.push(viewport.worldToCanvas(point));
// We get the other point for the arrow by using the image size
if (data[1] !== undefined) {
canvasCoordinates.push(viewport.worldToCanvas(data[1]));
}
else{
// We get the other point for the arrow by using the image size
const imagePixelModule = metaData.get('imagePixelModule', referencedImageId);
let xOffset = 10;
@@ -249,6 +253,9 @@ export default class DICOMSRDisplayTool extends AnnotationTool {
]);
canvasCoordinates.push(viewport.worldToCanvas(arrowEnd));
}
const arrowUID = `${index}`;