From e854031f5dfcb56776cde1a261c6aae84dcc6dae Mon Sep 17 00:00:00 2001 From: dalthviz <16781833+dalthviz@users.noreply.github.com> Date: Wed, 8 May 2024 13:37:49 -0500 Subject: [PATCH] Add basic layer modes description ('pan_zoom' and 'transform') --- docs/guides/layers.md | 18 ++++++++++++++++++ docs/howtos/layers/shapes.md | 2 +- docs/images/transform-tool.png | Bin 0 -> 854 bytes 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 docs/images/transform-tool.png diff --git a/docs/guides/layers.md b/docs/guides/layers.md index 596f01480..edf173dec 100644 --- a/docs/guides/layers.md +++ b/docs/guides/layers.md @@ -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` diff --git a/docs/howtos/layers/shapes.md b/docs/howtos/layers/shapes.md index 03b85f09d..81267e1bf 100644 --- a/docs/howtos/layers/shapes.md +++ b/docs/howtos/layers/shapes.md @@ -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 diff --git a/docs/images/transform-tool.png b/docs/images/transform-tool.png new file mode 100644 index 0000000000000000000000000000000000000000..3488d5701887863a84a4ad4879c6add5972ebe20 GIT binary patch literal 854 zcmV-c1F8IpP)y|^4;sZN@>(KqA}&xUN+p<-3C5tt#Aua-3Iq^AKv-V-e>&Ae zX0toMvb&p20P3w zIq&2_-Dm@Cu~0G?6uK)2RxjF8gwf*>hd%P>j# zi)aQ?^vo#Z((e=mVe|rx1;!tW5defpXYx>~HbfwU)u-A+V}bGUF%ViEI7{bX-sAzB zD+rZZ9jaFXELgnv17r7wVb0_x#tarO%o<&yVSJBZ7)ng&x#gamG_-7Aw`W$v??@;P zkIzH^RymHn!7U>9>vus>4rO)2xK=kvZhS}_C>r5BVJKbJVDI3kqMR<6*H#}aXh=%d zTV}`F&^*%Q885#H4WUgEQ%w%AAd5CXG+SM$)rEm|NHq+C2+aQ8r&v%$X(bEo5^S z5Z_4xhJ`}V7Q_3ea6xoo$fOHX1%rzCjcpMqogKbSvDV=3!D@`gj*e4+JCDL(i-mAA zo&XQOC3~+Lh61(P*Te`GIjI3@KmKW-z|eCF+gzapo9`1aZ|)UBsXXm#g273cKV}C{ zK+wg~s!Nq(9yHtCJ|Kju3vE(!Z0=CsVl=~0gS4{le>?3{iZVwhsev$3Z-t^CWpj1I zxC2p=L%YczGKCb@6^Qo1;3mlAitzdCcfjL>o@;cDZWvV1I~<+xYS{(2N|R$v29_(7 zMWB4KJhbwT1%@h##CC|$YE1yn6C!Z{_~URsaA107*qoM6N<$g0gak0RR91 literal 0 HcmV?d00001