@searpent/react-image-annotate 2.0.53 → 2.0.55
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.
- package/ImageCanvas/index.js +8 -0
- package/MainLayout/index.js +1 -1
- package/PageSelector/index.js +1 -2
- package/package.json +1 -1
package/ImageCanvas/index.js
CHANGED
|
@@ -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
|
package/MainLayout/index.js
CHANGED
|
@@ -297,7 +297,7 @@ export var MainLayout = function MainLayout(_ref5) {
|
|
|
297
297
|
|
|
298
298
|
return {
|
|
299
299
|
id: "".concat(i.id),
|
|
300
|
-
src: i.
|
|
300
|
+
src: i.thumbnail,
|
|
301
301
|
isActive: idx === state.selectedImage,
|
|
302
302
|
pageNumber: (i === null || i === void 0 ? void 0 : (_i$metadata = i.metadata) === null || _i$metadata === void 0 ? void 0 : (_i$metadata$find = _i$metadata.find(function (md) {
|
|
303
303
|
return md.key === "pageNumber";
|
package/PageSelector/index.js
CHANGED
|
@@ -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, {
|