Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dhufnagel committed Jan 7, 2021
1 parent f186612 commit 013e935
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/display/annotation_layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -626,9 +626,11 @@ class TextWidgetAnnotationElement extends WidgetAnnotationElement {
}

if (this.data.defaultAppearance) {
let fontDescription = this.data.defaultAppearance.match(/(\w+)\s(\d+)\sTf/);
if (fontDescription) {
let fontSize = parseInt(fontDescription[2]);
const fontDescriptionComponents = this.data.defaultAppearance.match(
/(\w+)\s(\d+)\sTf/
);
if (fontDescriptionComponents) {
const fontSize = parseInt(fontDescriptionComponents[2]);
if (fontSize > 0) {
element.style.fontSize = `${fontSize}px`;
}
Expand Down

0 comments on commit 013e935

Please sign in to comment.