Skip to content

Commit

Permalink
Docs on Turn off view resetting on new representations
Browse files Browse the repository at this point in the history
  • Loading branch information
pechersky committed Feb 15, 2024
1 parent 0a5d308 commit c6e4247
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion docs/viewer-state.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,16 @@ plugin.managers.camera.focusLoci(loci); // loci: Loci
Restore the default camera position by:
```ts
plugin.managers.camera.reset();
```
```

### 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 } });
```

0 comments on commit c6e4247

Please sign in to comment.