@searpent/react-image-annotate 2.0.72 → 2.0.73
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.
|
@@ -1405,6 +1405,22 @@ export default (function (state, action) {
|
|
|
1405
1405
|
}));
|
|
1406
1406
|
}
|
|
1407
1407
|
|
|
1408
|
+
case "ZOOM_RESET":
|
|
1409
|
+
{
|
|
1410
|
+
if (state.selectedImage === undefined || state.selectedImage === null) {
|
|
1411
|
+
return state;
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
var deselectedRegions = state.images[state.selectedImage].regions.map(function (i) {
|
|
1415
|
+
return _objectSpread({}, i, {
|
|
1416
|
+
highlighted: false,
|
|
1417
|
+
groupHighlighted: false
|
|
1418
|
+
});
|
|
1419
|
+
});
|
|
1420
|
+
state = setIn(state, ["selectedGroupId"], null);
|
|
1421
|
+
return setIn(state, ["images", state.selectedImage, "regions"], deselectedRegions);
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1408
1424
|
default:
|
|
1409
1425
|
break;
|
|
1410
1426
|
}
|
package/HighlightBox/index.js
CHANGED
|
@@ -27,11 +27,12 @@ var useStyles = makeStyles(function (theme) {
|
|
|
27
27
|
opacity: 0.6
|
|
28
28
|
},
|
|
29
29
|
"& path": {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
// NOTE: attributes below commnted because resetting screen caused old frame to highlight
|
|
31
|
+
// vectorEffect: "non-scaling-stroke",
|
|
32
|
+
// strokeWidth: 2,
|
|
33
|
+
// stroke: "#FFF",
|
|
34
|
+
// strokeDasharray: 5,
|
|
33
35
|
fill: "none",
|
|
34
|
-
strokeDasharray: 5,
|
|
35
36
|
animationName: "$borderDance",
|
|
36
37
|
animationDuration: "4s",
|
|
37
38
|
animationTimingFunction: "linear",
|
package/ImageCanvas/index.js
CHANGED
|
@@ -100,6 +100,7 @@ export var ImageCanvas = function ImageCanvas(_ref2) {
|
|
|
100
100
|
onDeleteGroup = _ref2.onDeleteGroup,
|
|
101
101
|
onChangeVideoTime = _ref2.onChangeVideoTime,
|
|
102
102
|
onChangeVideoPlaying = _ref2.onChangeVideoPlaying,
|
|
103
|
+
onResetZoom = _ref2.onResetZoom,
|
|
103
104
|
onRegionClassAdded = _ref2.onRegionClassAdded,
|
|
104
105
|
_ref2$zoomOnAllowedAr = _ref2.zoomOnAllowedArea,
|
|
105
106
|
zoomOnAllowedArea = _ref2$zoomOnAllowedAr === void 0 ? true : _ref2$zoomOnAllowedAr,
|
|
@@ -221,6 +222,7 @@ export var ImageCanvas = function ImageCanvas(_ref2) {
|
|
|
221
222
|
}
|
|
222
223
|
|
|
223
224
|
var resetZoom = function resetZoom() {
|
|
225
|
+
onResetZoom();
|
|
224
226
|
changeMat(getDefaultMat(zoomOnAllowedArea ? allowedArea : null, layoutParams.current));
|
|
225
227
|
};
|
|
226
228
|
|
package/MainLayout/index.js
CHANGED
|
@@ -233,6 +233,11 @@ export var MainLayout = function MainLayout(_ref5) {
|
|
|
233
233
|
onDeleteRegion: action("DELETE_REGION", "region"),
|
|
234
234
|
onDeleteGroup: action("DELETE_GROUP", "groupId"),
|
|
235
235
|
onBeginBoxTransform: action("BEGIN_BOX_TRANSFORM", "box", "directions"),
|
|
236
|
+
onResetZoom: function onResetZoom() {
|
|
237
|
+
return dispatch({
|
|
238
|
+
type: "ZOOM_RESET"
|
|
239
|
+
});
|
|
240
|
+
},
|
|
236
241
|
onBeginMovePolygonPoint: action("BEGIN_MOVE_POLYGON_POINT", "polygon", "pointIndex"),
|
|
237
242
|
onBeginMoveKeypoint: action("BEGIN_MOVE_KEYPOINT", "region", "keypointId"),
|
|
238
243
|
onAddPolygonPoint: action("ADD_POLYGON_POINT", "polygon", "point", "pointIndex"),
|