Skip to content

Commit 5f9604e

Browse files
committed
Editor: unified positioning for canvas and iframe
1 parent 24fa5c0 commit 5f9604e

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

editor/index.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,12 @@
6868
flex: 1;
6969
background: #111;
7070
overflow: hidden;
71-
position: relative;
7271
display: flex;
7372
align-items: center;
7473
justify-content: center;
7574
}
7675
#preview-area canvas { display: block !important; }
77-
#preview-area iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; display: block; }
76+
#preview-area iframe { width: 100%; height: 100%; border: none; display: block; flex-shrink: 0; }
7877

7978
#preview-placeholder { color: #555; font-size: 13px; text-align: center; line-height: 2.2; }
8079
#preview-placeholder kbd {
@@ -273,7 +272,7 @@
273272
const canvas = document.createElement('canvas');
274273
canvas.id = 'canvas';
275274
canvas.style.display = 'block';
276-
canvas.style.margin = 'auto';
275+
277276
area.appendChild(canvas);
278277
window.Module = {
279278
canvas: canvas,

0 commit comments

Comments
 (0)