clowder-framework / CONSORT-frontend

custom react frontend working with consort clowder instance
0 stars 0 forks source link

70 highlight sentences #76

Closed minump closed 3 months ago

minump commented 5 months ago

highlight sentence in frontend PdfPreview. Sentences and coordinates read from "highlights.json" output file from rct-extractor.

Label is displayed once per sentence near the first coordinates list. Label displayed on either side of the text. If the text is on the left side, label is displayed on the left margin. If text on right, label is displayed after "text_width".

Known issues :

  1. If sentence has multiple labels, the labels are displayed on top of each other as the label position is the same.
  2. Determining if the text is on the left side or not is a hardcoded decision - If the x coordinate is < half the canvas width, it is left-aligned and if not its right-aligned. This causes some labels to be displayed on top of other texts, if texts are in the margin -- depending on the original pdf style.

Fixes #70 #75

minump commented 4 months ago

pushed and deployed to hub.ncsa.illinois.edu/clowder/consort-frontend:0.4.0 - tested. works fine.

minump commented 3 months ago

Merging to main.