fixed age slider label, added current selected year label and maximum oldest year

This commit is contained in:
mattiapezzotti
2024-06-29 09:11:43 +02:00
parent 6d1a6c29a2
commit fd7534b175
3 changed files with 41 additions and 15 deletions
+13 -2
View File
@@ -383,7 +383,16 @@ export function uiSectionPhotoOverlays(context) {
.append('span')
.call(t.append('photo_overlays.age_slider_filter.title'));
labelEnter
let sliderWrap = labelEnter
.append('div')
.attr('class','slider-wrap')
let output = sliderWrap
.append('output')
.html(currYear)
.attr('class','year-selected');
sliderWrap
.append('input')
.attr('type', 'range')
.attr('max', currYear)
@@ -394,10 +403,12 @@ export function uiSectionPhotoOverlays(context) {
.on('change', function() {
var value = d3_select(this).property('value');
context.photos().setMaxPhotoYear(parseInt(value));
output.html(value);
});
let datalist = labelEnter
let datalist = sliderWrap
.append('datalist')
.attr('class', 'year-datalist')
.attr('id', 'dateValues')
datalist