@konfuzio/document-validation-ui 0.1.26-dev.1 → 0.1.26-dev.2
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/js/app.js +1 -1
- package/dist/js/app.js.map +1 -1
- package/package.json +1 -1
- package/src/store/document.js +10 -2
package/package.json
CHANGED
package/src/store/document.js
CHANGED
|
@@ -304,6 +304,7 @@ const getters = {
|
|
|
304
304
|
let annotations = [];
|
|
305
305
|
let labels = [];
|
|
306
306
|
let processedAnnotationSets = [];
|
|
307
|
+
let processedLabels = [];
|
|
307
308
|
annotationSets.forEach((annotationSet) => {
|
|
308
309
|
labels = [];
|
|
309
310
|
annotationSet.labels.forEach((label) => {
|
|
@@ -333,15 +334,22 @@ const getters = {
|
|
|
333
334
|
}
|
|
334
335
|
if (addLabel) {
|
|
335
336
|
labels.push({ ...label, annotations: labelAnnotations });
|
|
337
|
+
let addProcessedLabel = true;
|
|
338
|
+
processedLabels.forEach((processedLabel) => {
|
|
339
|
+
if (processedLabel.id === label.id) {
|
|
340
|
+
addProcessedLabel = false;
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
processedLabels.push(label);
|
|
336
345
|
}
|
|
337
346
|
annotations.push(...labelAnnotations);
|
|
338
347
|
});
|
|
339
348
|
processedAnnotationSets.push({ ...annotationSet, labels });
|
|
340
349
|
});
|
|
341
|
-
|
|
342
350
|
return {
|
|
343
351
|
annotationSets: processedAnnotationSets,
|
|
344
|
-
labels,
|
|
352
|
+
labels: processedLabels,
|
|
345
353
|
annotations,
|
|
346
354
|
};
|
|
347
355
|
},
|