@searpent/react-image-annotate 2.0.34 → 2.0.36
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/Annotator/index.js
CHANGED
|
@@ -211,7 +211,7 @@ export var Annotator = function Annotator(_ref) {
|
|
|
211
211
|
|
|
212
212
|
|
|
213
213
|
useEffect(function () {
|
|
214
|
-
if (!state.lastAction || !["BEGIN_BOX_TRANSFORM", "CHANGE_REGION", "DELETE_REGION", "UPDATE_METADATA"].includes(state.lastAction.type)) {
|
|
214
|
+
if (!state.lastAction || !["BEGIN_BOX_TRANSFORM", "CHANGE_REGION", "DELETE_REGION", "UPDATE_METADATA", "SELECT_CLASSIFICATION"].includes(state.lastAction.type)) {
|
|
215
215
|
return;
|
|
216
216
|
}
|
|
217
217
|
|
|
@@ -1192,7 +1192,7 @@ export default (function (state, action) {
|
|
|
1192
1192
|
|
|
1193
1193
|
if (articleMetadataRegionIdx < 0) {
|
|
1194
1194
|
console.error("can't find article metadata for goupId \"".concat(_groupId2, "\""));
|
|
1195
|
-
return;
|
|
1195
|
+
return state;
|
|
1196
1196
|
}
|
|
1197
1197
|
|
|
1198
1198
|
var articleRegionToUpdate = (_state$images$_imageI2 = state.images[_imageIndex]) === null || _state$images$_imageI2 === void 0 ? void 0 : _state$images$_imageI2.regions[articleMetadataRegionIdx];
|
|
@@ -1203,7 +1203,7 @@ export default (function (state, action) {
|
|
|
1203
1203
|
|
|
1204
1204
|
if (toBeUpdatedMetadataIdx < 0) {
|
|
1205
1205
|
console.error("can't find metadata field in article metadata for key \"".concat(name, "\""));
|
|
1206
|
-
return;
|
|
1206
|
+
return state;
|
|
1207
1207
|
}
|
|
1208
1208
|
|
|
1209
1209
|
articleMetadata[toBeUpdatedMetadataIdx].value = value;
|
|
@@ -1219,7 +1219,7 @@ export default (function (state, action) {
|
|
|
1219
1219
|
|
|
1220
1220
|
if (_metadataIndex < 0) {
|
|
1221
1221
|
console.error("can't find photo metadata by key \"".concat(name, "\""));
|
|
1222
|
-
return;
|
|
1222
|
+
return state;
|
|
1223
1223
|
}
|
|
1224
1224
|
|
|
1225
1225
|
return setIn(state, ["images", _imageIndex, "metadata", _metadataIndex], {
|