Skip to content

Commit

Permalink
Merge pull request #458 from Kitware/update-vtkjs
Browse files Browse the repository at this point in the history
feat(vtk.js): upgrade to v28
  • Loading branch information
floryst authored Oct 19, 2023
2 parents 1c33fae + 8ee8969 commit 6b6d170
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 44 deletions.
62 changes: 31 additions & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"dependencies": {
"@aws-sdk/client-s3": "^3.321.1",
"@itk-wasm/dicom": "^3.2.1",
"@kitware/vtk.js": "^27.4.6",
"@kitware/vtk.js": "^28.13.0",
"@netlify/edge-functions": "^2.0.0",
"@sentry/vue": "^7.54.0",
"@vueuse/core": "^8.5.0",
Expand Down Expand Up @@ -81,7 +81,7 @@
"chai-almost": "^1.0.1",
"chai-as-promised": "7.1.1",
"chai-subset": "^1.6.0",
"chromedriver": "^116.0.0",
"chromedriver": "117.0.0",
"cross-env": "^7.0.3",
"eslint": "^7.32.0",
"eslint-config-prettier": "6.15.0",
Expand Down Expand Up @@ -124,4 +124,4 @@
"eslint"
]
}
}
}
6 changes: 2 additions & 4 deletions src/vtk/CrosshairsWidget/behavior.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ export default function widgetBehavior(publicAPI: any, model: any) {
model.manipulator &&
!ignoreKey(callData)
) {
const worldCoordsOfPointer = model.manipulator.handleEvent(
callData,
model._apiSpecificRenderWindow
);
const { worldCoords: worldCoordsOfPointer } =
model.manipulator.handleEvent(callData, model._apiSpecificRenderWindow);

const handle = model.widgetState.getHandle();
const worldToIndex = model.widgetState.getWorldToIndex();
Expand Down
4 changes: 2 additions & 2 deletions src/vtk/PaintWidget/behavior.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function widgetBehavior(publicAPI: any, model: any) {
return macro.VOID;
}

const worldCoords = model.manipulator.handleEvent(
const { worldCoords } = model.manipulator.handleEvent(
eventData,
model._apiSpecificRenderWindow
);
Expand All @@ -45,7 +45,7 @@ export default function widgetBehavior(publicAPI: any, model: any) {
return macro.VOID;
}

const worldCoords = model.manipulator.handleEvent(
const { worldCoords } = model.manipulator.handleEvent(
eventData,
model._apiSpecificRenderWindow
);
Expand Down
3 changes: 2 additions & 1 deletion src/vtk/PolygonWidget/behavior.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ export default function widgetBehavior(publicAPI: any, model: any) {
return undefined;
}

return manipulator.handleEvent(callData, model._apiSpecificRenderWindow);
return manipulator.handleEvent(callData, model._apiSpecificRenderWindow)
.worldCoords;
}

function updateActiveStateHandle(callData: any) {
Expand Down
6 changes: 3 additions & 3 deletions src/vtk/RulerWidget/behavior.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default function widgetBehavior(publicAPI: any, model: any) {
return macro.VOID;
}

const worldCoords = model.manipulator.handleEvent(
const { worldCoords } = model.manipulator.handleEvent(
eventData,
model._apiSpecificRenderWindow
);
Expand Down Expand Up @@ -141,7 +141,7 @@ export default function widgetBehavior(publicAPI: any, model: any) {
* Moves a point around.
*/
publicAPI.handleMouseMove = (eventData: any) => {
const worldCoords = model.manipulator.handleEvent(
const { worldCoords } = model.manipulator.handleEvent(
eventData,
model._apiSpecificRenderWindow
);
Expand Down Expand Up @@ -181,7 +181,7 @@ export default function widgetBehavior(publicAPI: any, model: any) {
*/
publicAPI.handleLeftButtonRelease = (eventData: any) => {
if (draggingState) {
const worldCoords = model.manipulator.handleEvent(
const { worldCoords } = model.manipulator.handleEvent(
eventData,
model._apiSpecificRenderWindow
);
Expand Down

0 comments on commit 6b6d170

Please sign in to comment.