From 45caad47f8a53c4f97626699a5c4517cf665980e Mon Sep 17 00:00:00 2001 From: elioat Date: Tue, 24 Dec 2024 22:26:25 -0500 Subject: * --- js/pixel-art/pixel/app.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'js') 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'); -- cgit 1.4.1-2-gfad0