Fix: Rechtes Panel tatsächlich kleiner schiebbar
Alle Panels nutzen jetzt feste px-Werte, das letzte Panel bekommt den Restplatz über JS-Berechnung statt CSS 1fr. Dadurch kann der Drag-Handle die Breite tatsächlich reduzieren. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
8a6ed764c5
commit
f414e820e6
1 changed files with 8 additions and 7 deletions
|
|
@ -30,12 +30,13 @@
|
|||
|
||||
function applyWidths() {
|
||||
if (!gridEl) return;
|
||||
// 7 Spalten: panel 8px panel 8px panel 8px panel(rest)
|
||||
// Letztes Panel füllt den verfügbaren Platz
|
||||
const cols = panelWidths.map((w, i) => {
|
||||
if (i < panelWidths.length - 1) return `${w}px 8px`;
|
||||
return `minmax(80px, 1fr)`;
|
||||
}).join(' ');
|
||||
const available = gridEl.clientWidth - 24; // 3 Handles × 8px
|
||||
const total = panelWidths[0] + panelWidths[1] + panelWidths[2] + panelWidths[3];
|
||||
|
||||
// Letztes Panel bekommt den Restplatz (mindestens 80px)
|
||||
const lastWidth = Math.max(80, panelWidths[3] + (available - total));
|
||||
|
||||
const cols = `${panelWidths[0]}px 8px ${panelWidths[1]}px 8px ${panelWidths[2]}px 8px ${lastWidth}px`;
|
||||
gridEl.style.gridTemplateColumns = cols;
|
||||
}
|
||||
|
||||
|
|
@ -186,7 +187,7 @@
|
|||
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: 220px 8px 1fr 8px 1fr 8px 1fr;
|
||||
grid-template-columns: 220px 8px 1fr 8px 1fr 8px 380px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue