Open lchauvin opened 3 months ago
Are you referring to resizeToFit
? If so, sure. Having a setting to toggle its functionality is fine by me.
in vtkSliceView
:
interface Props {
viewId: string;
imageId: Maybe<string>;
viewDirection: LPSAxisDir;
viewUp: LPSAxisDir;
disableAutoResetCamera?: boolean;
}
There is a disableAutoResetCamera
but there is not UI to toggle it.
What is the difference between disabledAutoResetCamera
in VtkSliceView
, autoFit
in useAutoFitState
and noAutoReset
(that I don't really understand where it's defined / updated) in VtkSliceView
:
watchImmediate([disableAutoResetCamera, viewID, imageID], ([noAutoReset]) => {
if (noAutoReset) return;
resetCamera();
});
Should I create a new useAutoResetCameraState
file, or should I use the resizeToFit
variable from useAutoFitState
?
Looks like the useAutoFitState
is VtkSliceView
internal detail. disabledAutoResetCamera
camera looks like a winner.
Indeed, you just want "disableAutoResetCamera" since noAutoReset is just the watched value of the former variable.
On August 21, 2024 7:32:11 PM UTC, Paul Elliott @.***> wrote:
Looks like the
useAutoFitState
isVtkSliceView
internal detail.disabledAutoResetCamera
camera looks like a winner.-- Reply to this email directly or view it on GitHub: https://github.com/Kitware/VolView/issues/638#issuecomment-2302866521 You are receiving this because you commented.
Message ID: @.***>
Is it a property that should be in CameraConfig (for each combination of view / data), or intrinsic to the camera properties ?
That's just a property exposed through the component. Right now we can just use a global toggle for that behavior, unless there are actual use-cases for having that toggle exist per-view/data combination.
So now in vtkSliceView
file, the 'disableAutoResetCamera' property is useless or deprecated?
No, but it's coming from a pinia store now:
const { disableCameraAutoReset } = storeToRefs(useViewCameraStore());
The property has been removed I believe.
Hello,
I saw that there is a variable to turn off the camera reset, but there is no UI.
I'm planning to add a toggle button to the settings to turn on / off the automatic camera reset.
Any objection or comments ?