Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix vtkImageSlice typescript definitions #2896

Conversation

jadh4v
Copy link
Collaborator

@jadh4v jadh4v commented Aug 21, 2023

Addresses issue: #2878

Fix typescript definition error when using vtkImageResliceMapper with vtkImageSlice. Change vtkImageSlice to accept vtkAbstractImageMapper when calling setMapper.

Fixes errors such as:

Argument of type 'vtkImageResliceMapper' is not assignable to parameter of type
'vtkImageMapper'. Type 'vtkImageResliceMapper' is missing the following
properties from type 'vtkImageMapper': getSliceAtPosition, getClosestIJKAxis,
getBoundsForSlice, getRenderToRectangle, and 15 more.

Context

Results

Changes

  • Documentation and TypeScript definitions were updated to match those changes

PR and Code Checklist

  • semantic-release commit messages
  • Run npm run reformat to have correctly formatted code

Testing

  • This change adds or fixes unit tests
  • Tested environment:
    • vtk.js: latest master
    • OS: Windows 11 Pro
    • Browser: MS Edge Version 115.0.1901.203 (Official build) (64-bit)

@jadh4v jadh4v force-pushed the fix-ImageResliceMapper-ImageSlice-typescript-defs branch from 03311c9 to 32301a4 Compare August 21, 2023 01:50
@jadh4v jadh4v requested review from floryst and daker August 21, 2023 14:49
Copy link
Collaborator

@daker daker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jadh4v jadh4v force-pushed the fix-ImageResliceMapper-ImageSlice-typescript-defs branch 3 times, most recently from 9f36aac to cc211cd Compare August 22, 2023 21:48
Fix typescript definition error when using vtkImageResliceMapper with
vtkImageSlice. Change vtkImageSlice to accept vtkAbstractImageMapper.

Fixes errors such as:
```
Argument of type 'vtkImageResliceMapper' is not assignable to parameter of type
'vtkImageMapper'. Type 'vtkImageResliceMapper' is missing the following
properties from type 'vtkImageMapper': getSliceAtPosition, getClosestIJKAxis,
getBoundsForSlice, getRenderToRectangle, and 15 more.
```
@jadh4v jadh4v force-pushed the fix-ImageResliceMapper-ImageSlice-typescript-defs branch from cc211cd to 18356b4 Compare August 22, 2023 22:08
@jadh4v jadh4v requested a review from floryst August 23, 2023 15:25
@jadh4v jadh4v added this pull request to the merge queue Aug 23, 2023
Merged via the queue into Kitware:master with commit 1b1e756 Aug 23, 2023
4 checks passed
@jadh4v jadh4v deleted the fix-ImageResliceMapper-ImageSlice-typescript-defs branch August 23, 2023 15:49
@github-actions
Copy link

🎉 This PR is included in version 28.8.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot added the released Automated label label Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Automated label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants