Skip to content

Commit

Permalink
Add basic layer modes description ('pan_zoom' and 'transform')
Browse files Browse the repository at this point in the history
  • Loading branch information
dalthviz committed May 8, 2024
1 parent 1d5c5b9 commit e854031
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions docs/guides/layers.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,24 @@ currently supported by napari, check out the
introduction, check out the
[Layer list section in the napari viewer tutorial](layer-list).

(layer_mode)=
## Layer mode

All our layers support a `mode` property that changes the way you interact
with the layer from the viewer. These modes are accesible via the layer controls widget top buttons and via shortcuts (pressing a number from `1` to the number of modes available for the layer). Depending on the layer type, more modes could be available. Currently, there are two base modes: Pan and zoom (`pan_zoom`) and Transform (`transform`):

* Pan and zoom
![image: Pan/zoom](../images/pan-zoom-tool.png)

The `pan_zoom` mode allows you to pan around and zoom in/out the layer. It's the default mode selected.

* Transform
![image: Transform](../images/transform-tool.png)

The `transform` mode allows you to translate, rotate, and scale the layer graphically. To reset the transformation, you can Option/Alt-click the transform button over the layer controls (a confirmation dialog will open to confirm the reset).

For a more detailed description of layer modes available check each [layer how-to guide](using-layers).

## Layer visibility

All our layers support a visibility toggle that allows you to set the `visible`
Expand Down
2 changes: 1 addition & 1 deletion docs/howtos/layers/shapes.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ are used. i.e. You can't remove a vertex before you have created a shape.
than one shape, select one, hold down the shift key and select the rest.

* **Pan/zoom**
![image: Select shapes](../../images/pan-zoom-tool.png)
![image: Pan/zoom](../../images/pan-zoom-tool.png)

Use this tool to pan around the image or zoom in. Pan and zoom functionality
is disabled when using the adding and editing tools. Temporarily re-enable pan
Expand Down
Binary file added docs/images/transform-tool.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e854031

Please sign in to comment.