From 9a38d0932d64b4a2ed5a6a2499490094d3bf8e7e Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Mon, 23 Sep 2024 17:44:15 -0400 Subject: Automatically select the last used lens for a body --- www/photo.causal.agency/trips.html | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'www/photo.causal.agency/trips.html') diff --git a/www/photo.causal.agency/trips.html b/www/photo.causal.agency/trips.html index ddad2adb..547f7ba2 100644 --- a/www/photo.causal.agency/trips.html +++ b/www/photo.causal.agency/trips.html @@ -241,6 +241,10 @@ function setTripBody() { option.appendChild(document.createTextNode(lensString(lens))); select.appendChild(option); } + let lastTrip = trips.findLast(trip => trip.body == bodyName); + if (lastTrip) { + select.value = lastTrip.lens; + } let roll = rolls[body.name]; if (roll) { document.getElementById("trip-film").value = roll.film; -- cgit 1.4.1