diff options
author | elioat <elioat@tilde.institute> | 2024-12-24 22:26:25 -0500 |
---|---|---|
committer | elioat <elioat@tilde.institute> | 2024-12-24 22:26:25 -0500 |
commit | 45caad47f8a53c4f97626699a5c4517cf665980e (patch) | |
tree | 36c0806672414f5451ce30b13b8588eddc040494 /js | |
parent | 9420a45728b4c2af3b4bc2a33f2f6981003dcc1c (diff) | |
download | tour-45caad47f8a53c4f97626699a5c4517cf665980e.tar.gz |
*
Diffstat (limited to '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'); |