FIX: Support optional logos when previewing the wizard
This commit is contained in:
parent
2ddabc3928
commit
aa80c8cbdd
|
@ -126,8 +126,11 @@ export function createPreviewComponent(width, height, obj) {
|
||||||
// Logo
|
// Logo
|
||||||
const headerMargin = headerHeight * 0.2;
|
const headerMargin = headerHeight * 0.2;
|
||||||
const logoHeight = headerHeight - (headerMargin * 2);
|
const logoHeight = headerHeight - (headerMargin * 2);
|
||||||
|
|
||||||
|
if (this.logo) {
|
||||||
const logoWidth = (logoHeight / this.logo.height) * this.logo.width;
|
const logoWidth = (logoHeight / this.logo.height) * this.logo.width;
|
||||||
this.scaleImage(this.logo, headerMargin, headerMargin, logoWidth, logoHeight);
|
this.scaleImage(this.logo, headerMargin, headerMargin, logoWidth, logoHeight);
|
||||||
|
}
|
||||||
|
|
||||||
// Top right menu
|
// Top right menu
|
||||||
this.scaleImage(this.avatar, width - avatarSize - headerMargin, headerMargin, avatarSize, avatarSize);
|
this.scaleImage(this.avatar, width - avatarSize - headerMargin, headerMargin, avatarSize, avatarSize);
|
||||||
|
|
Loading…
Reference in New Issue