From c6e4247192391a5aff8145191773d7eb850c2927 Mon Sep 17 00:00:00 2001 From: Yakov Pechersky Date: Thu, 15 Feb 2024 11:59:13 -0500 Subject: [PATCH] Docs on Turn off view resetting on new representations --- docs/viewer-state.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/viewer-state.md b/docs/viewer-state.md index d5dfb7b..4bea390 100644 --- a/docs/viewer-state.md +++ b/docs/viewer-state.md @@ -117,4 +117,16 @@ plugin.managers.camera.focusLoci(loci); // loci: Loci Restore the default camera position by: ```ts plugin.managers.camera.reset(); -``` \ No newline at end of file +``` + +### Turn off view resetting on new representations +A new representation via something like +```ts +.apply(StateTransforms.Representation.VolumeRepresentation3D, ...) +``` +can reset the view to make the whole representation visible. +When one wants to keep the view the same instead of having the rep reset the view, +keep the view constant by: +```ts +plugin.canvas3d?.setProps({ camera: { manualReset: true } }); +```