Skip to content

Commit

Permalink
Do not add border when none is defined or set to transparent (#696)
Browse files Browse the repository at this point in the history
  • Loading branch information
btecu authored Dec 13, 2020
1 parent 2bc57a1 commit ad8858f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/api/form/appearances.ts
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ export const defaultButtonAppearanceProvider: AppearanceProviderFor<PDFButton> =
const normalText = captions?.normal ?? '';
const downText = captions?.down ?? normalText ?? '';

const borderWidth = bs?.getWidth() ?? 1;
const borderWidth = bs?.getWidth() ?? 0;
const rotation = reduceRotation(ap?.getRotation());
const { width, height } = adjustDimsForRotation(rectangle, rotation);

Expand Down Expand Up @@ -443,7 +443,7 @@ export const defaultTextFieldAppearanceProvider: AppearanceProviderFor<PDFTextFi
const bs = widget.getBorderStyle();
const text = textField.getText() ?? '';

const borderWidth = bs?.getWidth() ?? 1;
const borderWidth = bs?.getWidth() ?? 0;
const rotation = reduceRotation(ap?.getRotation());
const { width, height } = adjustDimsForRotation(rectangle, rotation);

Expand Down Expand Up @@ -535,7 +535,7 @@ export const defaultDropdownAppearanceProvider: AppearanceProviderFor<PDFDropdow
const bs = widget.getBorderStyle();
const text = dropdown.getSelected()[0] ?? '';

const borderWidth = bs?.getWidth() ?? 1;
const borderWidth = bs?.getWidth() ?? 0;
const rotation = reduceRotation(ap?.getRotation());
const { width, height } = adjustDimsForRotation(rectangle, rotation);

Expand Down Expand Up @@ -601,7 +601,7 @@ export const defaultOptionListAppearanceProvider: AppearanceProviderFor<PDFOptio
const ap = widget.getAppearanceCharacteristics();
const bs = widget.getBorderStyle();

const borderWidth = bs?.getWidth() ?? 1;
const borderWidth = bs?.getWidth() ?? 0;
const rotation = reduceRotation(ap?.getRotation());
const { width, height } = adjustDimsForRotation(rectangle, rotation);

Expand Down

0 comments on commit ad8858f

Please # to comment.