Skip to content

Commit

Permalink
fix(imagemapper): change slice interaction to use window size instead…
Browse files Browse the repository at this point in the history
… of viewport

This will ensure that different sized viewports in the same window will exhibit the same behavior.
  • Loading branch information
sankhesh authored and floryst committed Mar 19, 2024
1 parent 2f85a5e commit 3b712c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Interaction/Style/InteractorStyleImage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 3b712c4

Please sign in to comment.