diff --git a/extensions/iframe.js b/extensions/iframe.js index ce87728a2c..0c312d571e 100644 --- a/extensions/iframe.js +++ b/extensions/iframe.js @@ -79,8 +79,12 @@ iframe.style.height = `${(effectiveHeight / stageHeight) * 100}%`; iframe.style.transform = ""; - iframe.style.top = `${(0.5 - effectiveHeight / 2 / stageHeight) * 100}%`; - iframe.style.left = `${(0.5 - effectiveWidth / 2 / stageWidth) * 100}%`; + iframe.style.top = `${ + (0.5 - effectiveHeight / 2 / stageHeight - y / stageHeight) * 100 + }%`; + iframe.style.left = `${ + (0.5 - effectiveWidth / 2 / stageWidth + x / stageWidth) * 100 + }%`; } };