mirror of
https://github.com/misskey-dev/misskey
synced 2024-12-03 09:19:03 +09:00
🎨
This commit is contained in:
parent
0555e98c3f
commit
ea3db748c7
@ -251,9 +251,9 @@ function windowEventHandler(event: MessageEvent) {
|
||||
function calcScale() {
|
||||
if (!resizerRootEl.value) return;
|
||||
const previewWidth = resizerRootEl.value.clientWidth - 40; // 左右の余白 20pxずつ
|
||||
const previewHeight = resizerRootEl.value.clientHeight - 40; // 上下の余白 20pxずつ(プレビューの文字は28px)
|
||||
const previewHeight = resizerRootEl.value.clientHeight - 40; // 上下の余白 20pxずつ
|
||||
const iframeWidth = 500;
|
||||
const scale = Math.min(previewWidth / iframeWidth, previewHeight / iframeHeight.value, 1); // 拡大はしない
|
||||
const scale = Math.min(previewWidth / iframeWidth, previewHeight / iframeHeight.value, 1); // 拡大はしないので1を上限に
|
||||
iframeScale.value = scale;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user