fix canvas width/height being bad on chrome
This commit is contained in:
parent
2cf11a3f36
commit
2b614dcb79
2
TODO.md
2
TODO.md
@ -8,7 +8,7 @@
|
|||||||
- [x] Update GH Workflow to be by push
|
- [x] Update GH Workflow to be by push
|
||||||
|
|
||||||
## Next
|
## Next
|
||||||
- [ ] Fix css bug on chromium
|
- [x] Fix css bug on chromium
|
||||||
- [ ] Add user page to show all projects
|
- [ ] Add user page to show all projects
|
||||||
|
|
||||||
## Later
|
## Later
|
||||||
|
@ -18,6 +18,11 @@ export const Pico8Console = forwardRef((props: { carts: PicoCart[] }, forwardedR
|
|||||||
picoConsole.canvas.tabIndex=0;
|
picoConsole.canvas.tabIndex=0;
|
||||||
if (ref.current) {
|
if (ref.current) {
|
||||||
ref.current.appendChild(picoConsole.canvas);
|
ref.current.appendChild(picoConsole.canvas);
|
||||||
|
|
||||||
|
// Set the width and height because pico8 adds them as properties on chrome-based browsers
|
||||||
|
picoConsole.canvas.style.width = "";
|
||||||
|
picoConsole.canvas.style.height = "";
|
||||||
|
|
||||||
picoConsole.canvas.focus();
|
picoConsole.canvas.focus();
|
||||||
}
|
}
|
||||||
setHandle(picoConsole);
|
setHandle(picoConsole);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user