mirror of
https://github.com/MeexReay/poshlostios.git
synced 2025-06-24 02:22:58 +03:00
remove scroll while graphics are enabled
This commit is contained in:
parent
e750cfc79e
commit
a8843c453c
@ -3,6 +3,7 @@ var graphics_context = null
|
|||||||
|
|
||||||
|
|
||||||
function enableGraphics(options={}) {
|
function enableGraphics(options={}) {
|
||||||
|
document.body.style.overflow = "hidden"
|
||||||
graphics_canvas = document.createElement("canvas")
|
graphics_canvas = document.createElement("canvas")
|
||||||
graphics_canvas.id = "graphics"
|
graphics_canvas.id = "graphics"
|
||||||
graphics_canvas.width = window.innerWidth.toString()
|
graphics_canvas.width = window.innerWidth.toString()
|
||||||
@ -58,6 +59,7 @@ function getGraphics() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function disableGraphics() {
|
function disableGraphics() {
|
||||||
|
document.body.style.overflow = null
|
||||||
graphics_canvas.remove()
|
graphics_canvas.remove()
|
||||||
graphics_canvas = null
|
graphics_canvas = null
|
||||||
graphics_context = null
|
graphics_context = null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user