@searpent/react-image-annotate 2.0.34 → 2.0.35

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.
Files changed (2) hide show
  1. package/Annotator/index.js +12 -15
  2. package/package.json +1 -1
@@ -207,23 +207,20 @@ export var Annotator = function Annotator(_ref) {
207
207
  type: "ADD_GROUP",
208
208
  group: group
209
209
  });
210
- }; // trigger this on every BBox manipulation (there is currently no way to detect adding of new box!)
210
+ }; // FIXME: solve this problem
211
+ // // trigger this on every BBox manipulation (there is currently no way to detect adding of new box!)
212
+ // useEffect(() => {
213
+ // if (!state.lastAction || !["BEGIN_BOX_TRANSFORM", "CHANGE_REGION", "DELETE_REGION", "UPDATE_METADATA", "SELECT_CLASSIFICATION"].includes(state.lastAction.type)) { return }
214
+ // if (onImagesChange) {
215
+ // onImagesChange(state.images)
216
+ // }
217
+ // dispatchToReducer({
218
+ // type: "IMAGES_UPDATED",
219
+ // updatedAt: new Date()
220
+ // })
221
+ // }, [onImagesChange, state.images, state.lastAction])
211
222
 
212
223
 
213
- useEffect(function () {
214
- if (!state.lastAction || !["BEGIN_BOX_TRANSFORM", "CHANGE_REGION", "DELETE_REGION", "UPDATE_METADATA"].includes(state.lastAction.type)) {
215
- return;
216
- }
217
-
218
- if (onImagesChange) {
219
- onImagesChange(state.images);
220
- }
221
-
222
- dispatchToReducer({
223
- type: "IMAGES_UPDATED",
224
- updatedAt: new Date()
225
- });
226
- }, [onImagesChange, state.images, state.lastAction]);
227
224
  useEffect(function () {
228
225
  if (selectedImage === undefined) return;
229
226
  dispatchToReducer({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searpent/react-image-annotate",
3
- "version": "2.0.34",
3
+ "version": "2.0.35",
4
4
  "dependencies": {
5
5
  "@editorjs/editorjs": "^2.25.0",
6
6
  "@editorjs/paragraph": "^2.8.0",