Skip to content

Commit 8b45513

Browse files
Keep custom map options hidden by default
1 parent 73aad5f commit 8b45513

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ <h3>Stage</h3>
253253
<input type="checkbox" id="enable-custom-bounds" /><label for="enable-custom-bounds"
254254
title="[EXPERIMENTAL] Define custom map boundaries instead of auto-cropping.">Use custom map boundaries</label>
255255
</div>
256-
<div id="custom-bounds-inputs" class="hidden">
256+
<div id="custom-bounds-inputs">
257257
<div>
258258
<label for="min-lat">Min lat:</label><input type="number" id="min-lat" step="any" min="-90" max="90">
259259
<label for="max-lat">Max lat:</label><input type="number" id="max-lat" step="any" min="-90" max="90">

static/css/style.css

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,11 +508,21 @@ ion-icon+span {
508508
#custom-bounds-inputs {
509509
display: flex;
510510
flex-direction: column;
511-
gap: 0.5rem;
512511
margin-top: 0.5rem;
513-
padding: 0.75rem;
514512
background-color: rgba(0, 0, 0, 0.05);
515513
border-radius: 0.25rem;
514+
max-height: 0;
515+
overflow: hidden;
516+
opacity: 0;
517+
transition: max-height 0.35s cubic-bezier(.4,0,.2,1), opacity 0.25s, padding 0.25s, gap 0.25s;
518+
}
519+
520+
#custom-bounds-inputs.show {
521+
max-height: 200px;
522+
opacity: 1;
523+
padding: 0.75rem;
524+
gap: 0.5rem;
525+
transition: max-height 0.35s cubic-bezier(.4,0,.2,1), opacity 0.25s, padding 0.25s, gap 0.25s;
516526
}
517527

518528
#custom-bounds-inputs>div {

static/js/generate.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,9 @@ document.addEventListener("DOMContentLoaded", () => {
255255
const customBoundsCheckbox = document.getElementById("enable-custom-bounds");
256256
const customBoundsInputs = document.getElementById("custom-bounds-inputs");
257257
if (customBoundsCheckbox && customBoundsInputs) {
258+
customBoundsInputs.classList.toggle("show", customBoundsCheckbox.checked);
258259
customBoundsCheckbox.addEventListener("change", (e) => {
259-
customBoundsInputs.classList.toggle("hidden", !e.target.checked);
260+
customBoundsInputs.classList.toggle("show", e.target.checked);
260261
});
261262
}
262263
});

0 commit comments

Comments
 (0)