From 3b712c4b0fb776b79d05ca44875af8268138e146 Mon Sep 17 00:00:00 2001 From: Sankhesh Jhaveri Date: Thu, 29 Feb 2024 11:25:24 -0500 Subject: [PATCH] fix(imagemapper): change slice interaction to use window size instead of viewport This will ensure that different sized viewports in the same window will exhibit the same behavior. --- Sources/Interaction/Style/InteractorStyleImage/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Interaction/Style/InteractorStyleImage/index.js b/Sources/Interaction/Style/InteractorStyleImage/index.js index f4ee8b11045..736655842fe 100644 --- a/Sources/Interaction/Style/InteractorStyleImage/index.js +++ b/Sources/Interaction/Style/InteractorStyleImage/index.js @@ -206,7 +206,7 @@ function vtkInteractorStyleImage(publicAPI, model) { viewportHeight = 2.0 * distance * Math.tan(0.5 * angle); } - const size = rwi.getView().getViewportSize(renderer); + const size = rwi.getView().getSize(); const delta = (dy * viewportHeight) / size[1]; distance += delta;