Skip to content

Commit 8d691b2

Browse files
committed
web: Fix display issues
1 parent f3ccbb9 commit 8d691b2

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

dist/web/source/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ <h2 id="not_working">
9696
</div>
9797
</div>
9898

99-
<div id="canvas-wrapper" style="width: 100%; height: 100%">
100-
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
99+
<div id="canvas-wrapper" class="imhex-web-canvas-wrapper">
100+
<canvas class="imhex-web-canvas canvas-fixed" id="canvas" ></canvas>
101101
</div>
102102

103103
<script src="wasm-config.js"></script>

dist/web/source/style.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,4 +185,23 @@ a:hover {
185185
position: absolute;
186186
top: 0;
187187
left: 0;
188+
}
189+
190+
.imhex-web-canvas {
191+
width: 100%;
192+
height: 100%;
193+
display: block;
194+
overflow: hidden;
195+
image-rendering: smooth;
196+
margin: 0;
197+
padding: 0;
198+
z-index: 1;
199+
}
200+
201+
.imhex-web-canvas-wrapper {
202+
position: relative;
203+
width: 100%;
204+
height: 100%;
205+
overflow: hidden;
206+
background-size: 100% 100%;
188207
}

0 commit comments

Comments
 (0)