mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-30 03:39:36 +02:00
Flexbox the background and map data layer lists
This commit is contained in:
+14
-15
@@ -135,6 +135,19 @@ export function uiBackground(context) {
|
||||
.classed('layer-custom', function(d) { return d.id === 'custom'; })
|
||||
.classed('best', function(d) { return d.best(); });
|
||||
|
||||
var label = enter
|
||||
.append('label');
|
||||
|
||||
label
|
||||
.append('input')
|
||||
.attr('type', type)
|
||||
.attr('name', 'layers')
|
||||
.on('change', change);
|
||||
|
||||
label
|
||||
.append('span')
|
||||
.text(function(d) { return d.name(); });
|
||||
|
||||
enter.filter(function(d) { return d.id === 'custom'; })
|
||||
.append('button')
|
||||
.attr('class', 'layer-browse')
|
||||
@@ -155,23 +168,9 @@ export function uiBackground(context) {
|
||||
.append('span')
|
||||
.html('★');
|
||||
|
||||
var label = enter
|
||||
.append('label');
|
||||
|
||||
label
|
||||
.append('input')
|
||||
.attr('type', type)
|
||||
.attr('name', 'layers')
|
||||
.on('change', change);
|
||||
|
||||
label
|
||||
.append('span')
|
||||
.text(function(d) { return d.name(); });
|
||||
|
||||
|
||||
layerList.selectAll('li')
|
||||
.sort(sortSources)
|
||||
.style('display', layerList.selectAll('li').data().length > 0 ? 'block' : 'none');
|
||||
.sort(sortSources);
|
||||
|
||||
layerList
|
||||
.call(updateLayerSelections);
|
||||
|
||||
+16
-16
@@ -505,6 +505,22 @@ export function uiMapData(context) {
|
||||
.append('li')
|
||||
.attr('class', 'list-item-data');
|
||||
|
||||
var labelEnter = liEnter
|
||||
.append('label')
|
||||
.call(tooltip()
|
||||
.title(t('map_data.layers.custom.tooltip'))
|
||||
.placement('top')
|
||||
);
|
||||
|
||||
labelEnter
|
||||
.append('input')
|
||||
.attr('type', 'checkbox')
|
||||
.on('change', function() { toggleLayer('data'); });
|
||||
|
||||
labelEnter
|
||||
.append('span')
|
||||
.text(t('map_data.layers.custom.title'));
|
||||
|
||||
liEnter
|
||||
.append('button')
|
||||
.call(tooltip()
|
||||
@@ -527,22 +543,6 @@ export function uiMapData(context) {
|
||||
})
|
||||
.call(svgIcon('#iD-icon-search'));
|
||||
|
||||
var labelEnter = liEnter
|
||||
.append('label')
|
||||
.call(tooltip()
|
||||
.title(t('map_data.layers.custom.tooltip'))
|
||||
.placement('top')
|
||||
);
|
||||
|
||||
labelEnter
|
||||
.append('input')
|
||||
.attr('type', 'checkbox')
|
||||
.on('change', function() { toggleLayer('data'); });
|
||||
|
||||
labelEnter
|
||||
.append('span')
|
||||
.text(t('map_data.layers.custom.title'));
|
||||
|
||||
// Update
|
||||
ul = ul
|
||||
.merge(ulEnter);
|
||||
|
||||
Reference in New Issue
Block a user