Fix overflow in error log dialog

Fix molang editor overflow in animation properties dialog
This commit is contained in:
JannisX11 2024-02-14 20:18:42 +01:00
parent 388a17d9b6
commit 0525ad3bd1
3 changed files with 5 additions and 2 deletions

View File

@ -147,6 +147,9 @@
.dialog_bar > label {
width: var(--max_label_width);
}
.dialog_bar > .molang_input {
width: calc(100% - var(--max_label_width));
}
/*.dialog_bar::after {
content: "";
clear: both;

View File

@ -744,7 +744,7 @@ window.Dialog = class Dialog {
handle.append(title);
let jq_dialog = $(this.object);
this.max_label_width = 0;
this.max_label_width = 140;
this.uses_wide_inputs = false;
let wrapper = document.createElement('div');

View File

@ -478,7 +478,7 @@ const MenuBar = {
'open_dev_tools',
{name: 'Error Log', condition: () => window.ErrorLog.length, icon: 'error', color: 'red', keybind: {toString: () => window.ErrorLog.length.toString()}, click() {
let lines = window.ErrorLog.slice(0, 64).map((error) => {
return Interface.createElement('p', {}, `${error.message}\n - In .${error.file.split(location.origin).join('')} : ${error.line}`);
return Interface.createElement('p', {style: 'word-break: break-word;'}, `${error.message}\n - In .${error.file.split(location.origin).join('')} : ${error.line}`);
})
new Dialog({
id: 'error_log',