patch issue #1538

这个提交包含在:
binary-husky
2024-02-06 17:59:09 +08:00
父节点 c27e559f10
当前提交 6c13bb7b46
共有 2 个文件被更改,包括 27 次插入27 次删除

查看文件

@@ -242,14 +242,14 @@ function do_something_but_not_too_frequently(min_interval, func) {
// 现在就执行
setTimeout(() => {
func.apply(this, lastArgs);
}, 0);
}, 0);
} else if (!timeoutID) {
// 等一会执行
timeoutID = setTimeout(() => {
timeoutID = null;
lastInvocationTime = Date.now();
func.apply(this, lastArgs);
}, min_interval - (now - lastInvocationTime));
}, min_interval - (now - lastInvocationTime));
} else {
// 压根不执行
}
@@ -349,7 +349,7 @@ function get_elements(consider_state_panel = false) {
var chatbot_height = chatbot.style.height;
// 交换输入区位置,使得输入区始终可用
if (!swapped) {
if (panel1.top != 0 && (panel1.bottom + panel1.top) / 2 < 0) { swap_input_area(); }
if (panel1.top != 0 && (0.9 * panel1.bottom + 0.1 * panel1.top) < 0) { swap_input_area(); }
}
else if (swapped) {
if (panel2.top != 0 && panel2.top > 0) { swap_input_area(); }