fix(console): 撤销聊天宽度600上限(恢复动态自由拉伸)与分隔线偏移(贴回原边界)——仅保留动态可用空间钳制防负数
This commit is contained in:
@@ -17347,7 +17347,7 @@ var splitStore = {
|
||||
if (this.geom) {
|
||||
const minContent = main.reduce((a, p) => a + p.min, 0) + Math.max(0, main.length - 1) * GAP;
|
||||
const hi = Math.max(spec.chatWidth.min, this.geom.right - this.geom.left - minContent);
|
||||
this.chatW = clamp(Math.round(this.chatW), spec.chatWidth.min, Math.min(spec.chatWidth.max, hi));
|
||||
this.chatW = clamp(Math.round(this.chatW), spec.chatWidth.min, hi);
|
||||
}
|
||||
const g0 = this.geom;
|
||||
if (g0) {
|
||||
@@ -17487,7 +17487,7 @@ var splitStore = {
|
||||
const main = spec.main ?? [];
|
||||
const minContent = main.reduce((a, p) => a + p.min, 0) + Math.max(0, main.length - 1) * GAP;
|
||||
const hi = Math.max(spec.chatWidth.min, colW - minContent);
|
||||
this.chatW = clamp(Math.round(w), spec.chatWidth.min, Math.min(spec.chatWidth.max, hi));
|
||||
this.chatW = clamp(Math.round(w), spec.chatWidth.min, hi);
|
||||
this.applyMargin();
|
||||
this.persist();
|
||||
this.notify();
|
||||
@@ -19749,7 +19749,7 @@ function WorkspaceLayer(props) {
|
||||
title: hasLeft ? "\u62D6\u52A8\u8C03\u6574\u5DE6\u53F3\u5217\u5BBD" : "\u62D6\u52A8\u8C03\u6574\u804A\u5929\u5BBD\u5EA6",
|
||||
style: {
|
||||
position: "fixed",
|
||||
left: (hasLeft ? g.left + leftW : chatLeft ? g.left + chatW : g.right - chatW) - DIVIDER / 2 + (hasLeft ? 0 : chatLeft ? 3 : -3),
|
||||
left: (hasLeft ? g.left + leftW : chatLeft ? g.left + chatW : g.right - chatW) - DIVIDER / 2,
|
||||
top: hasLeft || chatFull ? barTop + BAR_H : bodyTop,
|
||||
width: DIVIDER,
|
||||
height: hasLeft || chatFull ? g.bottom - barTop - BAR_H : mainH,
|
||||
|
||||
@@ -801,7 +801,7 @@ export const splitStore: SplitState = {
|
||||
if (this.geom) {
|
||||
const minContent = main.reduce((a: number, p: SplitPane) => a + p.min, 0) + Math.max(0, main.length - 1) * GAP
|
||||
const hi = Math.max(spec.chatWidth.min, (this.geom.right - this.geom.left) - minContent)
|
||||
this.chatW = clamp(Math.round(this.chatW), spec.chatWidth.min, Math.min(spec.chatWidth.max, hi))
|
||||
this.chatW = clamp(Math.round(this.chatW), spec.chatWidth.min, hi)
|
||||
}
|
||||
// 均衡默认:无存档尺寸时按当前可用空间比例分配,
|
||||
// 不再出现“其余窗全部贴 min、最后一个吃掉全部余量”的悬殊观感。
|
||||
@@ -957,7 +957,7 @@ export const splitStore: SplitState = {
|
||||
const main = spec.main ?? []
|
||||
const minContent = main.reduce((a, p) => a + p.min, 0) + Math.max(0, main.length - 1) * GAP
|
||||
const hi = Math.max(spec.chatWidth.min, colW - minContent)
|
||||
this.chatW = clamp(Math.round(w), spec.chatWidth.min, Math.min(spec.chatWidth.max, hi))
|
||||
this.chatW = clamp(Math.round(w), spec.chatWidth.min, hi)
|
||||
this.applyMargin()
|
||||
this.persist()
|
||||
this.notify()
|
||||
@@ -3059,7 +3059,7 @@ function WorkspaceLayer(props: { spec: LayoutSpec; geom: Geom | null; chatW: num
|
||||
title={hasLeft ? '拖动调整左右列宽' : '拖动调整聊天宽度'}
|
||||
style={{
|
||||
position: 'fixed',
|
||||
left: (hasLeft ? g.left + leftW : (chatLeft ? g.left + chatW : g.right - chatW)) - DIVIDER / 2 + (hasLeft ? 0 : (chatLeft ? 3 : -3)),
|
||||
left: (hasLeft ? g.left + leftW : (chatLeft ? g.left + chatW : g.right - chatW)) - DIVIDER / 2,
|
||||
top: hasLeft || chatFull ? barTop + BAR_H : bodyTop,
|
||||
width: DIVIDER,
|
||||
height: hasLeft || chatFull ? g.bottom - barTop - BAR_H : mainH,
|
||||
|
||||
Reference in New Issue
Block a user