mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-04-07 23:55:57 +00:00
fix: explicitly set left panel + table width during drag for live column reflow
This commit is contained in:
@@ -38,15 +38,25 @@
|
||||
const w = Math.max(280, Math.min(window.innerWidth * 0.7, startW - (e2.clientX - startX)));
|
||||
panel.style.width = w + 'px';
|
||||
panel.style.minWidth = w + 'px';
|
||||
// Force table to reflow with new available width
|
||||
// Force left panel and table to match new available width
|
||||
const left = document.getElementById('pktLeft');
|
||||
if (left) { left.style.overflow = 'hidden'; void left.offsetWidth; left.style.overflow = ''; }
|
||||
const table = document.getElementById('pktTable');
|
||||
if (left && table) {
|
||||
const available = left.parentElement.clientWidth - w;
|
||||
left.style.width = available + 'px';
|
||||
table.style.width = available + 'px';
|
||||
}
|
||||
}
|
||||
function onUp() {
|
||||
handle.classList.remove('dragging');
|
||||
document.body.style.cursor = '';
|
||||
document.body.style.userSelect = '';
|
||||
localStorage.setItem(PANEL_WIDTH_KEY, panel.offsetWidth);
|
||||
// Clear forced widths, let flex take over
|
||||
const left = document.getElementById('pktLeft');
|
||||
const table = document.getElementById('pktTable');
|
||||
if (left) left.style.width = '';
|
||||
if (table) table.style.width = '';
|
||||
document.removeEventListener('mousemove', onMove);
|
||||
document.removeEventListener('mouseup', onUp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user