Fix: applyWidths() generiert korrekt 7 Grid-Spalten mit Handle-Gaps
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
82f40b6ae2
commit
fa60ade2fc
1 changed files with 8 additions and 5 deletions
|
|
@ -29,9 +29,13 @@
|
||||||
let handleEls: HTMLDivElement[] = [];
|
let handleEls: HTMLDivElement[] = [];
|
||||||
|
|
||||||
function applyWidths() {
|
function applyWidths() {
|
||||||
if (gridEl) {
|
if (!gridEl) return;
|
||||||
gridEl.style.gridTemplateColumns = panelWidths.map(w => `${w}px`).join(' ');
|
// 7 Spalten: panel 8px panel 8px panel 8px panel
|
||||||
}
|
const cols = panelWidths.map((w, i) => {
|
||||||
|
if (i < panelWidths.length - 1) return `${w}px 8px`;
|
||||||
|
return `${w}px`;
|
||||||
|
}).join(' ');
|
||||||
|
gridEl.style.gridTemplateColumns = cols;
|
||||||
}
|
}
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
|
|
@ -181,8 +185,7 @@
|
||||||
|
|
||||||
.grid {
|
.grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
/* 4 Panels + 3 Handles = 7 Spalten, Handles werden via JS positioniert */
|
grid-template-columns: 220px 8px 1fr 8px 1fr 8px 1fr;
|
||||||
grid-template-columns: 220px 8px 400px 8px 400px 8px 380px;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue