@konfuzio/document-validation-ui 0.1.40-dev.0 → 0.1.41-dev.0
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/dist/css/app.css +1 -1
- package/dist/index.html +1 -1
- package/dist/js/app.js +1 -1
- package/dist/js/app.js.map +1 -1
- package/package.json +1 -1
- package/src/components/DocumentPage/NewAnnotation.vue +13 -6
package/package.json
CHANGED
|
@@ -264,11 +264,15 @@ export default {
|
|
|
264
264
|
};
|
|
265
265
|
});
|
|
266
266
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
this.
|
|
271
|
-
|
|
267
|
+
let selection_bbox = null;
|
|
268
|
+
|
|
269
|
+
if (this.selection && this.selection.start && this.selection.end) {
|
|
270
|
+
selection_bbox = this.clientToBbox(
|
|
271
|
+
this.page,
|
|
272
|
+
this.selection.start,
|
|
273
|
+
this.selection.end
|
|
274
|
+
);
|
|
275
|
+
}
|
|
272
276
|
|
|
273
277
|
const annotationToCreate = {
|
|
274
278
|
document: this.documentId,
|
|
@@ -276,9 +280,12 @@ export default {
|
|
|
276
280
|
label: this.selectedLabel.id,
|
|
277
281
|
is_correct: true,
|
|
278
282
|
revised: false,
|
|
279
|
-
selection_bbox,
|
|
280
283
|
};
|
|
281
284
|
|
|
285
|
+
if (selection_bbox) {
|
|
286
|
+
annotationToCreate.selection_bbox = selection_bbox;
|
|
287
|
+
}
|
|
288
|
+
|
|
282
289
|
if (this.selectedSet.id) {
|
|
283
290
|
annotationToCreate.annotation_set = this.selectedSet.id;
|
|
284
291
|
} else {
|