fix: 窗间竖向分隔线居中(去掉+DIVIDER/2的3px右偏) 对齐窗缝正中
This commit is contained in:
@@ -1341,7 +1341,7 @@ function SplitWorkspace() {
|
|||||||
className="dsh-wt_splitDivider"
|
className="dsh-wt_splitDivider"
|
||||||
role="separator"
|
role="separator"
|
||||||
title="拖动调整宽度"
|
title="拖动调整宽度"
|
||||||
style={{ position: 'fixed', left: topRowX + it.left + it.width + DIVIDER / 2, top: topY, width: DIVIDER, height: topH, zIndex: 72 }}
|
style={{ position: 'fixed', left: topRowX + it.left + it.width, top: topY, width: DIVIDER, height: topH, zIndex: 72 }}
|
||||||
onPointerDown={makeDividerHandler('topPane', i)}
|
onPointerDown={makeDividerHandler('topPane', i)}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
@@ -1352,7 +1352,7 @@ function SplitWorkspace() {
|
|||||||
className="dsh-wt_splitDivider"
|
className="dsh-wt_splitDivider"
|
||||||
role="separator"
|
role="separator"
|
||||||
title="拖动调整宽度"
|
title="拖动调整宽度"
|
||||||
style={{ position: 'fixed', left: contentX + it.left + it.width + DIVIDER / 2, top: bodyTop, width: DIVIDER, height: mainH, zIndex: 72 }}
|
style={{ position: 'fixed', left: contentX + it.left + it.width, top: bodyTop, width: DIVIDER, height: mainH, zIndex: 72 }}
|
||||||
onPointerDown={makeDividerHandler('pane', i)}
|
onPointerDown={makeDividerHandler('pane', i)}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -582,3 +582,12 @@
|
|||||||
- 验证(functional-diag STEP10 扩展 + 种子加 1 条快捷方式):heights ta/pr/layout/shortcut 全 34px;
|
- 验证(functional-diag STEP10 扩展 + 种子加 1 条快捷方式):heights ta/pr/layout/shortcut 全 34px;
|
||||||
四类图标 computed 全 15px;删除确认等既有断言不变;ERRORS_COUNT: 0。
|
四类图标 computed 全 15px;删除确认等既有断言不变;ERRORS_COUNT: 0。
|
||||||
- 备注:纯客户端改动,F5 即生效,无需重启 dsh web。
|
- 备注:纯客户端改动,F5 即生效,无需重启 dsh web。
|
||||||
|
## 补记(窗间竖向分隔线居中修正)
|
||||||
|
|
||||||
|
- 用户反馈:窗口之间的竖向可拖动分隔线偏右,不在两个窗口缝隙的正中。
|
||||||
|
- 根因:窗格 border-box、allocate 留 6px 缝;分隔线定位写成了「窗右缘 + DIVIDER/2」
|
||||||
|
(左 = 缝右半起点),6px 线右半压进下一个窗口 → 视觉偏右 3px。
|
||||||
|
- 处理:主行与顶部行内垂直分隔线 left 去掉 + DIVIDER/2,直接对齐窗右缘([缝左, 缝左+6]),
|
||||||
|
中心 = 缝中心。聊天/左列/上下水平分隔线本就骑缝居中,不动。
|
||||||
|
- 验证(functional-diag STEP2 dividerAlign):paneRight=514、divLeft=514、divWidth=6、
|
||||||
|
centerOffset=0(修复前 +3);全 STEP 回归 ERROR_COUNT: 0。纯客户端改动,F5 生效。
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|||||||
console.log('STEP1:', JSON.stringify(step1));
|
console.log('STEP1:', JSON.stringify(step1));
|
||||||
await sleep(900);
|
await sleep(900);
|
||||||
|
|
||||||
const step2 = await evaluate("(function(){ var out={}; out.pickers=document.querySelectorAll('.dsh-wt_panePicker').length; out.pickButtons=document.querySelectorAll('.dsh-wt_panePick').length; out.pickerModes=Array.prototype.map.call(document.querySelectorAll('.dsh-wt_panePicker'),function(el){return el.className}); out.pickSize=(function(){var b=document.querySelector('.dsh-wt_panePick'); if(!b) return null; var r=b.getBoundingClientRect(); return {w:r.width,h:r.height};})(); var st=window.__dshWorktable.splitStore; st.openTab('main',0,{kind:'builtin',type:'browser'}); st.openTab('main',1,{kind:'builtin',type:'explorer'}); return JSON.stringify(out) })()");
|
const step2 = await evaluate("(function(){ var out={}; out.pickers=document.querySelectorAll('.dsh-wt_panePicker').length; out.pickButtons=document.querySelectorAll('.dsh-wt_panePick').length; out.pickerModes=Array.prototype.map.call(document.querySelectorAll('.dsh-wt_panePicker'),function(el){return el.className}); out.pickSize=(function(){var b=document.querySelector('.dsh-wt_panePick'); if(!b) return null; var r=b.getBoundingClientRect(); return {w:r.width,h:r.height};})(); out.dividerAlign=(function(){ var panes=document.querySelectorAll('.dsh-wt_pane'); var divs=document.querySelectorAll('.dsh-wt_splitDivider:not(.dsh-wt_splitDividerH)'); if(panes.length<2||divs.length<1) return null; var p0=panes[0].getBoundingClientRect(); var d=divs[0].getBoundingClientRect(); return {paneRight:Math.round(p0.right),divLeft:Math.round(d.left),divWidth:Math.round(d.width),centerOffset:Math.round((d.left+d.width/2)-(p0.right+3))}; })(); var st=window.__dshWorktable.splitStore; st.openTab('main',0,{kind:'builtin',type:'browser'}); st.openTab('main',1,{kind:'builtin',type:'explorer'}); return JSON.stringify(out) })()");
|
||||||
console.log('STEP2:', JSON.stringify(step2));
|
console.log('STEP2:', JSON.stringify(step2));
|
||||||
await sleep(900);
|
await sleep(900);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user