@konfuzio/document-validation-ui 0.1.34 → 0.1.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.
- 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/assets/scss/document_annotations.scss +1 -0
- package/src/components/DocumentPage/BoxSelection.vue +1 -0
- package/src/components/DocumentPage/DocumentPage.vue +22 -3
package/package.json
CHANGED
|
@@ -152,6 +152,7 @@
|
|
|
152
152
|
<box-selection
|
|
153
153
|
:page="page"
|
|
154
154
|
@createAnnotations="handleCreateAnnotationsFromSelection"
|
|
155
|
+
@selectEntities="handleEntitiesFromSelection"
|
|
155
156
|
/>
|
|
156
157
|
</v-layer>
|
|
157
158
|
<v-layer v-if="isMultiSelection">
|
|
@@ -465,7 +466,6 @@ export default {
|
|
|
465
466
|
)
|
|
466
467
|
return;
|
|
467
468
|
this.newAnnotation = [];
|
|
468
|
-
// this.endSelection();
|
|
469
469
|
|
|
470
470
|
const normalizedEntities = this.scaledEntities(entities, this.page);
|
|
471
471
|
if (normalizedEntities) {
|
|
@@ -482,6 +482,25 @@ export default {
|
|
|
482
482
|
}
|
|
483
483
|
},
|
|
484
484
|
|
|
485
|
+
handleEntitiesFromSelection(entities) {
|
|
486
|
+
if (
|
|
487
|
+
this.categorizeModalIsActive ||
|
|
488
|
+
this.publicView ||
|
|
489
|
+
this.isDocumentReviewed
|
|
490
|
+
)
|
|
491
|
+
return;
|
|
492
|
+
|
|
493
|
+
const normalizedEntities = this.scaledEntities(entities, this.page);
|
|
494
|
+
if (normalizedEntities.length > 0) {
|
|
495
|
+
this.$store.dispatch(
|
|
496
|
+
"selection/setSelectedEntities",
|
|
497
|
+
normalizedEntities
|
|
498
|
+
);
|
|
499
|
+
} else {
|
|
500
|
+
this.$store.dispatch("selection/setSelectedEntities", null);
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
|
|
485
504
|
handleClickedEntity(entity) {
|
|
486
505
|
if (
|
|
487
506
|
!entity ||
|
|
@@ -603,8 +622,8 @@ export default {
|
|
|
603
622
|
*/
|
|
604
623
|
entityRect(entity) {
|
|
605
624
|
let entityIsSelected = false;
|
|
606
|
-
if (this.
|
|
607
|
-
entityIsSelected = this.
|
|
625
|
+
if (this.selectedEntities && this.selectedEntities.length > 0) {
|
|
626
|
+
entityIsSelected = this.selectedEntities.find((selectedEntity) => {
|
|
608
627
|
return (
|
|
609
628
|
selectedEntity.original &&
|
|
610
629
|
selectedEntity.original.offset_string ===
|