templates/index.html aktualisiert
This commit is contained in:
@@ -260,10 +260,25 @@
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// GridStack laden
|
||||
try {
|
||||
var grid = GridStack.init({ cellHeight: 80, margin: 10, float: true, handle: '.widget-header' });
|
||||
// FIX: handles: 'all' hinzugefügt, damit man an jeder Seite ziehen kann
|
||||
var grid = GridStack.init({
|
||||
cellHeight: 80,
|
||||
margin: 10,
|
||||
float: true,
|
||||
handle: '.widget-header',
|
||||
resizable: { handles: 'all' }
|
||||
});
|
||||
|
||||
const savedLayout = localStorage.getItem('pi-orch-layout-v2');
|
||||
if (savedLayout) grid.load(JSON.parse(savedLayout));
|
||||
grid.on('resizestop dragstop', () => localStorage.setItem('pi-orch-layout-v2', JSON.stringify(grid.save(false))));
|
||||
grid.on('resizestop', (event, el) => {
|
||||
// Wenn das Terminal-Widget vergrößert wurde, pass das Terminal-Layout an
|
||||
if (el.getAttribute('gs-id') === 'term-widget') {
|
||||
setTimeout(() => fitAddon.fit(), 100);
|
||||
}
|
||||
});
|
||||
|
||||
} catch(e) { console.error("GridStack Fehler:", e); }
|
||||
|
||||
// Terminal
|
||||
|
||||
Reference in New Issue
Block a user