From 99e246ecb854a1b3c5116c21b1faacd1342ff030 Mon Sep 17 00:00:00 2001 From: John Factotum <50942278+johnfactotum@users.noreply.github.com> Date: Sat, 9 Sep 2023 14:34:27 +0800 Subject: [PATCH] FXL: hide empty iframes --- fixed-layout.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fixed-layout.js b/fixed-layout.js index 2d2da6e..ebc0e66 100644 --- a/fixed-layout.js +++ b/fixed-layout.js @@ -111,13 +111,13 @@ export class FixedLayout extends HTMLElement { right.height ?? blankHeight)) const transform = frame => { - const { element, iframe, width, height } = frame + const { element, iframe, width, height, blank } = frame Object.assign(iframe.style, { width: `${width}px`, height: `${height}px`, transform: `scale(${scale})`, transformOrigin: 'top left', - display: 'block', + display: blank ? 'none' : 'block', }) Object.assign(element.style, { width: `${(width ?? blankWidth) * scale}px`,