diff options
Diffstat (limited to 'js/leibovitz/contrast.js')
-rw-r--r-- | js/leibovitz/contrast.js | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/js/leibovitz/contrast.js b/js/leibovitz/contrast.js index b34f205..c2b1a28 100644 --- a/js/leibovitz/contrast.js +++ b/js/leibovitz/contrast.js @@ -1,18 +1,15 @@ /** - * @fileoverview Contrast management module implementing linear contrast adjustment. + * Contrast management module implementing linear contrast adjustment. * - * @description * Implements contrast adjustment using a linear scaling algorithm. * Provides real-time contrast control with immediate visual feedback. * - * @architecture * Implements the following design patterns: - * - Observer Pattern: For state management and effect application - * - Factory Pattern: For UI initialization - * - Strategy Pattern: For contrast adjustment algorithm - * - Command Pattern: For state reset operations + * - Observer Pattern: state management and effect application + * - Factory Pattern: UI initialization + * - Strategy Pattern: contrast adjustment algorithm + * - Command Pattern: state reset operations * - * @algorithm * Contrast adjustment process: * 1. Calculate contrast factor using formula: (259 * (contrast + 255)) / (255 * (259 - contrast)) * 2. Apply linear scaling to each color channel @@ -33,7 +30,6 @@ const ContrastManager = { /** * Initializes the contrast manager and sets up UI controls - * Implements the Factory pattern for UI initialization */ init() { this._setupEventListeners(); @@ -41,7 +37,6 @@ const ContrastManager = { /** * Sets up event listeners for UI controls - * Implements the Observer pattern for state changes */ _setupEventListeners() { this._slider = document.getElementById('contrast-slider'); @@ -96,7 +91,6 @@ const ContrastManager = { /** * Resets contrast effect to default state - * Implements the Command pattern for state reset */ reset() { this._currentContrast = 1.0; |