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 :
If sentence has multiple labels, the labels are displayed on top of each other as the label position is the same.
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.
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 :
Fixes #70 #75