Browse Source

fix keyboard shortcuts, z-order and update documentation

Christopher Prince 7 years ago
parent
commit
1eaf5bcc78

+ 2 - 1
docs/source/user/file_formats.rst

@@ -86,7 +86,8 @@ Images
 JupyterLab supports image data in cell output and as files in the above
 formats. In the image file viewer, you can use keyboard shortcuts such
 as ``+`` and ``-`` to zoom the image, ``[`` and ``]`` to rotate the image, 
-and ``0`` to reset the image.
+and ``H`` and ``V`` to flip the image horizontally and vertically. Use 
+``I`` to invert the colors, and use ``0`` to reset the image.
 
 To edit an SVG image as a text file, right-click on the SVG filename in
 the file browser and select the “Editor” item in the “Open With”

+ 2 - 2
packages/imageviewer-extension/src/index.ts

@@ -215,7 +215,7 @@ function addCommands(app: JupyterLab, tracker: IImageTracker) {
     const widget = tracker.currentWidget;
 
     if (widget) {
-      widget.rotation += 90;
+      widget.rotation -= 90;
     }
   }
 
@@ -223,7 +223,7 @@ function addCommands(app: JupyterLab, tracker: IImageTracker) {
     const widget = tracker.currentWidget;
 
     if (widget) {
-      widget.rotation -= 90;
+      widget.rotation += 90;
     }
   }
 

+ 1 - 0
packages/imageviewer/style/index.css

@@ -15,6 +15,7 @@
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
+  z-index: -1;
 }