FIX: Support optional logos when previewing the wizard

This commit is contained in:
Robin Ward 2016-11-07 11:06:32 -05:00
parent 2ddabc3928
commit aa80c8cbdd
1 changed files with 5 additions and 2 deletions

View File

@ -126,8 +126,11 @@ export function createPreviewComponent(width, height, obj) {
// Logo
const headerMargin = headerHeight * 0.2;
const logoHeight = headerHeight - (headerMargin * 2);
if (this.logo) {
const logoWidth = (logoHeight / this.logo.height) * this.logo.width;
this.scaleImage(this.logo, headerMargin, headerMargin, logoWidth, logoHeight);
}
// Top right menu
this.scaleImage(this.avatar, width - avatarSize - headerMargin, headerMargin, avatarSize, avatarSize);