@searpent/react-image-annotate 2.0.72 → 2.0.74
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.
|
@@ -996,6 +996,7 @@ export default (function (state, action) {
|
|
|
996
996
|
case "DELETE_SELECTED_REGION":
|
|
997
997
|
{
|
|
998
998
|
state = saveToHistory(state, "Delete selected region");
|
|
999
|
+
state = addSaveableAction(state, "DELETE_SELECTED_REGION");
|
|
999
1000
|
return setIn(state, [].concat(_toConsumableArray(pathToActiveImage), ["regions"]), (activeImage.regions || []).filter(function (r) {
|
|
1000
1001
|
return !r.highlighted;
|
|
1001
1002
|
}));
|
|
@@ -1405,6 +1406,22 @@ export default (function (state, action) {
|
|
|
1405
1406
|
}));
|
|
1406
1407
|
}
|
|
1407
1408
|
|
|
1409
|
+
case "ZOOM_RESET":
|
|
1410
|
+
{
|
|
1411
|
+
if (state.selectedImage === undefined || state.selectedImage === null) {
|
|
1412
|
+
return state;
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
var deselectedRegions = state.images[state.selectedImage].regions.map(function (i) {
|
|
1416
|
+
return _objectSpread({}, i, {
|
|
1417
|
+
highlighted: false,
|
|
1418
|
+
groupHighlighted: false
|
|
1419
|
+
});
|
|
1420
|
+
});
|
|
1421
|
+
state = setIn(state, ["selectedGroupId"], null);
|
|
1422
|
+
return setIn(state, ["images", state.selectedImage, "regions"], deselectedRegions);
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1408
1425
|
default:
|
|
1409
1426
|
break;
|
|
1410
1427
|
}
|
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"),
|