diff options
author | elioat <elioat@tilde.institute> | 2025-03-30 13:00:19 -0400 |
---|---|---|
committer | elioat <elioat@tilde.institute> | 2025-03-30 13:00:19 -0400 |
commit | f114cb799ac7426e6e481f0095bd467509248e55 (patch) | |
tree | 181999ab5d92d9e3483b3da8f6410aa544494e84 | |
parent | 48e029a29de5cbf8995684d1053afd96af5eeb9a (diff) | |
download | tour-f114cb799ac7426e6e481f0095bd467509248e55.tar.gz |
*
-rw-r--r-- | js/leibovitz/index.html | 7 | ||||
-rw-r--r-- | js/leibovitz/leibovitz.js | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/js/leibovitz/index.html b/js/leibovitz/index.html index 815726b..23132c6 100644 --- a/js/leibovitz/index.html +++ b/js/leibovitz/index.html @@ -307,6 +307,10 @@ #toggle-camera { padding: 10px 20px; font-family: 'ChicagoFLF', sans-serif; + border-right: 1px solid rgba(0, 0, 0, 0.1); + } + #toggle-camera.hidden { + display: none; } button, select, input[type="color"] { padding: 10px; @@ -371,9 +375,6 @@ text-align: center; flex: 1; } - #toggle-camera { - border-right: 1px solid rgba(0, 0, 0, 0.1); - } button.capture:disabled { background-color: #ccc; color: #5c5c5c; diff --git a/js/leibovitz/leibovitz.js b/js/leibovitz/leibovitz.js index 45821ba..0b5bfdc 100644 --- a/js/leibovitz/leibovitz.js +++ b/js/leibovitz/leibovitz.js @@ -118,6 +118,7 @@ function startCamera() { captureButton.disabled = false; captureButton.active = true; editImageButton.classList.add('hidden'); + toggleCameraButton.classList.add('hidden'); // Hide the toggle button isEditMode = false; originalImage = null; // Clear the original image updateSliderControlsVisibility(); // Show slider controls @@ -161,6 +162,7 @@ function startCamera() { }) .catch(err => { console.error('Error accessing camera: ', err); + toggleCameraButton.classList.remove('hidden'); // Show the button again if there's an error }); } @@ -175,6 +177,7 @@ function stopCamera() { focusControl.style.display = 'none'; stream = null; editImageButton.classList.remove('hidden'); + toggleCameraButton.classList.remove('hidden'); // Show the toggle button again updateSliderControlsVisibility(); // Hide slider controls if no image is loaded } } |