1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-11 20:58:19 +08:00

Opt: Limit max width of log

This commit is contained in:
18870
2022-01-21 15:14:26 +08:00
parent f134dae3ab
commit aea4c81b0b

View File

@@ -118,7 +118,7 @@ class RichLog:
$('#pywebio-scope-{scope}').css('font-size').slice(0, -2)/text.width*16;\
""".format(scope=self.scope)
width = eval_js(js)
return int(width) if width else 80
return 80 if width is None else 128 if width > 128 else int(width)
# def _register_resize_callback(self):
# js = """