diff options
Diffstat (limited to 'js/pixel-art/pixel/app.js')
-rw-r--r-- | js/pixel-art/pixel/app.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/js/pixel-art/pixel/app.js b/js/pixel-art/pixel/app.js index 2075e87..97c3a1c 100644 --- a/js/pixel-art/pixel/app.js +++ b/js/pixel-art/pixel/app.js @@ -253,10 +253,15 @@ function loadFromLocalStorage() { globalOffsetX = gridData.globalOffsetX || 0; globalOffsetY = gridData.globalOffsetY || 0; + // Set input values document.getElementById('gridWidth').value = gridWidth; document.getElementById('gridHeight').value = gridHeight; document.getElementById('colorPicker').value = currentColor; + // Disable grid size inputs if there's saved data + document.getElementById('gridWidth').disabled = true; + document.getElementById('gridHeight').disabled = true; + isPaletteVisible = gridData.isPaletteVisible ?? true; if (!isPaletteVisible) { palette.classList.add('hidden'); |