Skip to content

Commit

Permalink
Improve multiple_apps.html example/demo/test
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk authored and hacknus committed Oct 30, 2024
1 parent 9b85c8f commit 4f8db02
Showing 1 changed file with 7 additions and 28 deletions.
35 changes: 7 additions & 28 deletions web_demo/multiple_apps.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<!-- TODO(emilk): make this example nicer. The layout is HORRIBLE -->
<!DOCTYPE html>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Expand All @@ -21,11 +20,6 @@
display: flex;
}

.canvas_wrap {
/* height: 200px; */
width: 400px;
}

@media (prefers-color-scheme: dark) {
body {
/* Dark mode background color for what is not covered by the egui canvas,
Expand All @@ -37,24 +31,14 @@
/* Allow canvas to fill entire web page: */
html,
body {
overflow: hidden;
margin: 0 !important;
padding: 0 !important;
height: 100%;
width: 100%;
}

/* Position canvas in center-top: */
canvas {
/* margin-right: auto;
margin-left: auto; */
/* display: block;
position: absolute;
top: 0%;
left: 50%;
transform: translate(-50%, 0%); */
margin: 8px;
padding: 8px;
width: 45%;
height: 90%;
height: 98%;
}

.centered {
Expand Down Expand Up @@ -106,19 +90,14 @@
<body>
<!-- The WASM code will resize the canvas dynamically -->

<div>controls</div>

<button class="stop_one">
stop
Stop one app
</button>

<div class="canvas_wrap one">
<canvas id="canvas_id_one"></canvas>
</div>

<div class="canvas_wrap two">
<canvas id="canvas_id_two"></canvas>
</div>
<canvas id="canvas_id_one"></canvas>

<canvas id="canvas_id_two"></canvas>

<div class="centered" id="center_text">
<p style="font-size:16px">
Expand Down

0 comments on commit 4f8db02

Please sign in to comment.