Skip to content

Commit

Permalink
Merge pull request #14 from pechersky/view-manual-reset
Browse files Browse the repository at this point in the history
Docs on Turn off view resetting on new representations
  • Loading branch information
dsehnal committed Feb 15, 2024
2 parents 0a5d308 + c6e4247 commit db17806
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 db17806

Please sign in to comment.