@searpent/react-image-annotate 2.0.53 → 2.0.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,6 +22,7 @@ import VideoOrImageCanvasBackground from "../VideoOrImageCanvasBackground";
22
22
  import useEventCallback from "use-event-callback";
23
23
  import RegionShapes from "../RegionShapes";
24
24
  import useWasdMode from "./use-wasd-mode";
25
+ import useKey from "use-key-hook";
25
26
  var theme = createTheme();
26
27
  var useStyles = makeStyles(function (theme) {
27
28
  return styles;
@@ -219,6 +220,13 @@ export var ImageCanvas = function ImageCanvas(_ref2) {
219
220
  };
220
221
  }
221
222
 
223
+ var resetZoom = function resetZoom() {
224
+ changeMat(getDefaultMat(zoomOnAllowedArea ? allowedArea : null, layoutParams.current));
225
+ };
226
+
227
+ useKey(resetZoom, {
228
+ detectKeys: ['r']
229
+ });
222
230
  useEffect(function () {
223
231
  if (!imageLoaded) return;
224
232
  changeMat(getDefaultMat(zoomOnAllowedArea ? allowedArea : null, layoutParams.current)); // eslint-disable-next-line
@@ -50,8 +50,7 @@ function PageThumbnail(_ref) {
50
50
  role: "button",
51
51
  tabIndex: 0,
52
52
  className: classnames('ps-page-thumbnail', {
53
- 'ps-page-thumbnail-is-active': isActive,
54
- 'ps-page-thumbnail-disabled': isLocked
53
+ 'ps-page-thumbnail-is-active': isActive
55
54
  }),
56
55
  onClick: onClick
57
56
  }, isLocked && React.createElement(Locker, null), error && React.createElement(Errorer, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searpent/react-image-annotate",
3
- "version": "2.0.53",
3
+ "version": "2.0.54",
4
4
  "dependencies": {
5
5
  "@editorjs/editorjs": "^2.25.0",
6
6
  "@editorjs/paragraph": "^2.8.0",