Clean up runtime errors, fix VueUIs opening offscreen (#14025)

* Clean up runtime errors, fix VueUIs opening offscreen

* woops

* myazaki is based
This commit is contained in:
Wildkins
2022-05-20 18:36:14 +02:00
committed by GitHub
parent da0000f7f2
commit 2bb8db37b9
14 changed files with 51 additions and 22 deletions
+7 -1
View File
@@ -90,7 +90,13 @@ main ui datum.
var/params = "window=[windowid];file=[windowid];titlebar=0;can_resize=0;"
if(width && height)
params += "size=[width]x[height];"
var/winsize = winget(user, "mapwindow", "size")
var/map_size = splittext(winsize, "x")
var/screen_height = text2num(map_size[2])
if(height > screen_height)
params += "size=[width]x[max(screen_height - 100, 240)];"
else
params += "size=[width]x[height];"
send_resources_and_assets(user.client, load_asset)
user << browse(generate_html(load_asset?.css_tag()), params)
winset(user, "mapwindow.map", "focus=true")