react-vtkjs-viewport
react-vtkjs-viewport copied to clipboard
Paint widget and Zoom in MPR View
Hi guys,
As already discussed in this PR, I noticed that the paint widget is not correctly rendered when the MPR view is zoomed. You can easily reproduce this issue in the online example:
- Select the paint option -> the blue circle follow the mouse in the 2D View
- Select the Rotate option and zoom with the right mouse button
- Select the paint option -> the blue circle does no more folow the mouse movement
Seems that we need to update parallelScale and parallelProjection paint camera settings in the updateCameras method to have both layers synchronized :
...
const viewAngle = baseCamera.getReferenceByName('viewAngle');
const parallelScale = baseCamera.getReferenceByName('parallelScale');
const parallelProjection = baseCamera.getReferenceByName('parallelProjection');
paintCamera.set({
position,
focalPoint,
viewUp,
viewAngle,
parallelScale,
parallelProjection,
});
};
...
Thanks for your help.