fix: infinite margin on initialization (#362)
This commit is contained in:

committed by
GitHub

parent
b9cc1ccc3c
commit
fd54373be8
@@ -414,6 +414,8 @@ end
|
|||||||
|
|
||||||
-- Notifies other scripts such as console about where the unoccupied parts of the screen are.
|
-- Notifies other scripts such as console about where the unoccupied parts of the screen are.
|
||||||
function update_margins()
|
function update_margins()
|
||||||
|
if display.height == 0 then return end
|
||||||
|
|
||||||
-- margins are normalized to window size
|
-- margins are normalized to window size
|
||||||
local timeline, top_bar, controls = Elements.timeline, Elements.top_bar, Elements.controls
|
local timeline, top_bar, controls = Elements.timeline, Elements.top_bar, Elements.controls
|
||||||
local bottom_y = controls and controls.enabled and controls.ay or timeline.ay
|
local bottom_y = controls and controls.enabled and controls.ay or timeline.ay
|
||||||
|
Reference in New Issue
Block a user