change color if experimental

This commit is contained in:
Dan Percic 2023-08-02 17:40:33 +03:00
parent 14d967fa7d
commit bd7b2c8d08

View File

@ -72,11 +72,19 @@ export class AnnotationDrawService {
async drawTables(tables: Table[], page: number, dossierTemplateId: string) {
const sections: Core.Annotations.RectangleAnnotation[] = [];
tables.forEach(table => {
sections.push(this._computeSection(page, getSectionRectangle(table.boundingBox), dossierTemplateId));
const section = this._computeSection(page, getSectionRectangle(table.boundingBox), dossierTemplateId);
if (table.experimental) {
section.StrokeColor = this.convertColor('#800080');
}
sections.push(section);
table.cellsPerRow
.flatMap(row => row)
.forEach(row => {
sections.push(this._computeSection(page, getSectionRectangle(row.boundingBox), dossierTemplateId));
const cellSection = this._computeSection(page, getSectionRectangle(row.boundingBox), dossierTemplateId);
if (table.experimental) {
cellSection.StrokeColor = this.convertColor('#800080');
}
sections.push(cellSection);
});
});