From 237686136e5037858e1c4182645991dfe3e7ff98 Mon Sep 17 00:00:00 2001 From: elioat Date: Sat, 29 Mar 2025 23:10:07 -0400 Subject: * --- js/leibovitz/color.js | 6 +++++- js/leibovitz/contrast.js | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/js/leibovitz/color.js b/js/leibovitz/color.js index 4e9ed1b..8d14b83 100644 --- a/js/leibovitz/color.js +++ b/js/leibovitz/color.js @@ -22,9 +22,13 @@ const ColorManager = { const resetButton = document.getElementById('reset-color'); resetButton.addEventListener('click', () => { + // Reset color tint this._currentColor = null; - this._colorInput.value = '#000000'; // Reset to black + this._colorInput.value = '#000000'; this._notifyObservers(); + + // Reset contrast + ContrastManager.reset(); }); }, diff --git a/js/leibovitz/contrast.js b/js/leibovitz/contrast.js index 391556a..5e23124 100644 --- a/js/leibovitz/contrast.js +++ b/js/leibovitz/contrast.js @@ -51,5 +51,12 @@ const ContrastManager = { } return imageData; + }, + + // Add reset method + reset() { + this._currentContrast = 1.0; + this._slider.value = 0; // Reset slider to middle position + this._notifyObservers(); } }; \ No newline at end of file -- cgit 1.4.1-2-gfad0