Skip to content

Commit a74044b

Browse files
bruyeretfinetjul
authored andcommitted
fix(rcw): fix behavior when worldCoords is empty
Early return when manipulator returns an empty array
1 parent 5ec65e9 commit a74044b

File tree

1 file changed

+3
-0
lines changed
  • Sources/Widgets/Widgets3D/ResliceCursorWidget

1 file changed

+3
-0
lines changed

Sources/Widgets/Widgets3D/ResliceCursorWidget/behavior.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,9 @@ export default function widgetBehavior(publicAPI, model) {
435435
model._apiSpecificRenderWindow
436436
);
437437

438+
if (!worldCoords || !worldCoords.length) {
439+
return;
440+
}
438441
const center = model.widgetState.getCenter();
439442
const currentVectorToOrigin = [0, 0, 0];
440443
vtkMath.subtract(worldCoords, center, currentVectorToOrigin);

0 commit comments

Comments
 (0)