Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
fix(#743): QR code size calculation (again)
Browse files Browse the repository at this point in the history
Signed-off-by: peterpeterparker <[email protected]>
  • Loading branch information
peterpeterparker committed May 29, 2020
1 parent d4387c8 commit e610693
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ export class DeckdeckgoSlideQrcode implements DeckdeckgoSlideResize {
return;
}

const qrCodeSafeAreaSize: number = 64;
const qrCodeSafeAreaSize: number = 16;
const spacing: number = title.clientHeight + qrCodeSafeAreaSize;

const size: number =
(this.container.clientWidth < this.container.clientHeight
? this.container.clientWidth - parseFloat(style.paddingLeft) - parseFloat(style.paddingRight)
: this.container.clientHeight - parseFloat(style.paddingTop) - parseFloat(style.paddingBottom)) - spacing;
(parseFloat(style.width) < parseFloat(style.height)
? parseFloat(style.width) - parseFloat(style.paddingLeft) - parseFloat(style.paddingRight)
: parseFloat(style.height) - parseFloat(style.paddingTop) - parseFloat(style.paddingBottom)) - spacing;

this.qrCode.style.setProperty('--deckgo-qrcode-size', size + 'px');
}
Expand Down

0 comments on commit e610693

Please sign in to comment.