Skip to content

Commit c00ffdc

Browse files
authored
Merge pull request #101 from Kitware/update-vtkjs
chore: update vtk.js and types
2 parents 3f08176 + dafe67d commit c00ffdc

File tree

7 files changed

+14
-1482
lines changed

7 files changed

+14
-1482
lines changed

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"@babel/preset-env": "^7.19.1",
4040
"@babel/preset-react": "^7.18.6",
4141
"@babel/preset-typescript": "^7.18.6",
42-
"@kitware/vtk.js": "^26.5.3",
42+
"@kitware/vtk.js": "^26.5.5",
4343
"@rollup/plugin-babel": "^5.3.1",
4444
"@rollup/plugin-commonjs": "22.0.2",
4545
"@rollup/plugin-eslint": "^8.0.2",
@@ -77,4 +77,4 @@
7777
"files": [
7878
"dist"
7979
]
80-
}
80+
}

src/core/Picking.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { FieldAssociations } from '@kitware/vtk.js/Common/DataModel/DataSet/Constants.js';
22
import vtkOpenGLHardwareSelector from '@kitware/vtk.js/Rendering/OpenGL/HardwareSelector';
3-
import { FixedVTKOpenGLRenderWindow } from '@kitware/vtk.js/type-patches';
43
import { Vector2, Vector3 } from '@kitware/vtk.js/types';
54
import {
65
forwardRef,
@@ -342,7 +341,7 @@ export default forwardRef(function ViewPicking(props: Props, fwdRef) {
342341
const getScreenEventPositionFor = useCallback(
343342
(source: MouseEvent) => {
344343
const rw = openGLRenderWindowAPI.get();
345-
const canvas = (rw as FixedVTKOpenGLRenderWindow).getCanvas();
344+
const canvas = rw.getCanvas();
346345
if (!canvas) return { x: 0, y: 0, z: 0 };
347346

348347
const bounds = canvas.getBoundingClientRect();

src/core/modules/useApplyCenterOfRotation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import vtkInteractorStyle from '@kitware/vtk.js/Interaction/Style/InteractorStyle';
1+
import vtkInteractorStyle from '@kitware/vtk.js/Rendering/Core/InteractorStyle';
22
import {
33
FixedVTKRenderer,
44
VtkRendererEvent,

src/core/modules/useInteractorStyle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import vtkMouseCameraTrackballZoomManipulator, {
2020
import vtkMouseCameraTrackballZoomToMouseManipulator, {
2121
IMouseCameraTrackballZoomToMouseManipulatorInitialValues,
2222
} from '@kitware/vtk.js/Interaction/Manipulators/MouseCameraTrackballZoomToMouseManipulator';
23-
import vtkInteractorStyle from '@kitware/vtk.js/Interaction/Style/InteractorStyle';
2423
import vtkInteractorStyleManipulator from '@kitware/vtk.js/Interaction/Style/InteractorStyleManipulator';
24+
import vtkInteractorStyle from '@kitware/vtk.js/Rendering/Core/InteractorStyle';
2525
import vtkRenderWindowInteractor from '@kitware/vtk.js/Rendering/Core/RenderWindowInteractor';
2626
import deepEqual from 'deep-equal';
2727
import { useCallback, useEffect, useRef } from 'react';

0 commit comments

Comments
 (0)