@searpent/react-image-annotate 2.0.39 → 2.0.41
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/examplePhotos.js +1 -1
- package/Annotator/index.js +12 -6
- package/package.json +1 -1
|
@@ -797,7 +797,7 @@ var examplePhotos = [{
|
|
|
797
797
|
},
|
|
798
798
|
"text": "[{\"key\":\"articleType\",\"value\":\"ads\"}, {\"key\":\"section\",\"value\":\"last page\"}]",
|
|
799
799
|
"groupId": "1",
|
|
800
|
-
"id": "
|
|
800
|
+
"id": "2615bf87-7247-4bde-a0f9-45413034a6a6"
|
|
801
801
|
}]
|
|
802
802
|
}]
|
|
803
803
|
},
|
package/Annotator/index.js
CHANGED
|
@@ -155,27 +155,33 @@ export var Annotator = function Annotator(_ref) {
|
|
|
155
155
|
var _ref2 = _asyncToGenerator(
|
|
156
156
|
/*#__PURE__*/
|
|
157
157
|
_regeneratorRuntime.mark(function _callee(e) {
|
|
158
|
+
var createdAt;
|
|
158
159
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
159
160
|
while (1) {
|
|
160
161
|
switch (_context.prev = _context.next) {
|
|
161
162
|
case 0:
|
|
163
|
+
createdAt = new Date();
|
|
162
164
|
e.preventDefault();
|
|
163
165
|
|
|
164
166
|
if (!onSave) {
|
|
165
|
-
_context.next =
|
|
167
|
+
_context.next = 6;
|
|
166
168
|
break;
|
|
167
169
|
}
|
|
168
170
|
|
|
169
|
-
_context.next =
|
|
170
|
-
return onSave(
|
|
171
|
+
_context.next = 5;
|
|
172
|
+
return onSave({
|
|
173
|
+
images: state.images,
|
|
174
|
+
albumMetadata: state.albumMetadata,
|
|
175
|
+
createdAt: createdAt
|
|
176
|
+
});
|
|
171
177
|
|
|
172
|
-
case
|
|
178
|
+
case 5:
|
|
173
179
|
dispatchToReducer({
|
|
174
180
|
type: "IMAGES_SAVED",
|
|
175
|
-
savedAt:
|
|
181
|
+
savedAt: createdAt
|
|
176
182
|
});
|
|
177
183
|
|
|
178
|
-
case
|
|
184
|
+
case 6:
|
|
179
185
|
case "end":
|
|
180
186
|
return _context.stop();
|
|
181
187
|
}
|