Skip to content

Commit

Permalink
Fix canvas parent, set minimum width.
Browse files Browse the repository at this point in the history
  • Loading branch information
n3vu0r committed Aug 30, 2023
1 parent 75186e8 commit 75b9995
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
6 changes: 4 additions & 2 deletions examples/constellation_clamp.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
}
main {
flex: 1;
min-width: 1280px;
}
pre {
display: none;
Expand Down Expand Up @@ -99,9 +100,10 @@ <h1>bevy_trackball/examples/constellation_clamp.rs</h1>
e.preventDefault();
e.stopPropagation();
});
let pre = document.body.querySelector('pre');
pre.prepend(canvas);
let main = document.body.querySelector('main');
main.prepend(canvas);
canvas.style.display = 'block';
let pre = document.body.querySelector('pre');
pre.style.display = 'block';
}
});
Expand Down
6 changes: 4 additions & 2 deletions examples/egui.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
}
main {
flex: 1;
min-width: 1280px;
}
pre {
display: none;
Expand Down Expand Up @@ -99,9 +100,10 @@ <h1>bevy_trackball/examples/egui.rs</h1>
e.preventDefault();
e.stopPropagation();
});
let pre = document.body.querySelector('pre');
pre.prepend(canvas);
let main = document.body.querySelector('main');
main.prepend(canvas);
canvas.style.display = 'block';
let pre = document.body.querySelector('pre');
pre.style.display = 'block';
}
});
Expand Down
6 changes: 4 additions & 2 deletions examples/exponential_map.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
}
main {
flex: 1;
min-width: 1280px;
}
pre {
display: none;
Expand Down Expand Up @@ -99,9 +100,10 @@ <h1>bevy_trackball/examples/exponential_map.rs</h1>
e.preventDefault();
e.stopPropagation();
});
let pre = document.body.querySelector('pre');
pre.prepend(canvas);
let main = document.body.querySelector('main');
main.prepend(canvas);
canvas.style.display = 'block';
let pre = document.body.querySelector('pre');
pre.style.display = 'block';
}
});
Expand Down
6 changes: 4 additions & 2 deletions examples/gliding_clamp.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
}
main {
flex: 1;
min-width: 1280px;
}
pre {
display: none;
Expand Down Expand Up @@ -99,9 +100,10 @@ <h1>bevy_trackball/examples/gliding_clamp.rs</h1>
e.preventDefault();
e.stopPropagation();
});
let pre = document.body.querySelector('pre');
pre.prepend(canvas);
let main = document.body.querySelector('main');
main.prepend(canvas);
canvas.style.display = 'block';
let pre = document.body.querySelector('pre');
pre.style.display = 'block';
}
});
Expand Down

0 comments on commit 75b9995

Please sign in to comment.