mirror of
https://github.com/MeexReay/poshlostios.git
synced 2025-06-24 02:22:58 +03:00
add resizing graphics canvas on onresize event
This commit is contained in:
parent
2e0faa5d8c
commit
5c17c8908d
@ -41,6 +41,12 @@ function enableGraphics(options={}) {
|
|||||||
graphics_context = graphics_canvas.getContext("2d")
|
graphics_context = graphics_canvas.getContext("2d")
|
||||||
graphics_context.fillStyle = "black";
|
graphics_context.fillStyle = "black";
|
||||||
graphics_context.fillRect(0, 0, graphics_canvas.width, graphics_canvas.height);
|
graphics_context.fillRect(0, 0, graphics_canvas.width, graphics_canvas.height);
|
||||||
|
|
||||||
|
window.addEventListener("resize", (event) => {
|
||||||
|
graphics_canvas.width = window.innerWidth.toString()
|
||||||
|
graphics_canvas.height = window.innerHeight.toString()
|
||||||
|
})
|
||||||
|
|
||||||
document.body.appendChild(graphics_canvas)
|
document.body.appendChild(graphics_canvas)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,4 +93,4 @@ function getWindow(wid) {
|
|||||||
function listWindows() {
|
function listWindows() {
|
||||||
writeStdout("НА ВАШЕМ устройстве не найдена ни одна имплементация ZCOM. Установите чонить такое, по типу mxwm да есть же броу\n")
|
writeStdout("НА ВАШЕМ устройстве не найдена ни одна имплементация ZCOM. Установите чонить такое, по типу mxwm да есть же броу\n")
|
||||||
throw new Error("There is no zcom implementation")
|
throw new Error("There is no zcom implementation")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user