Skip to content

Commit f83e3d4

Browse files
committed
Clean up sidebar. Fix #15
1 parent df40545 commit f83e3d4

File tree

1 file changed

+61
-61
lines changed

1 file changed

+61
-61
lines changed

js/id/ui/map_overlays.js

+61-61
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
iD.ui.MapOverlay = function(context) {
22
var key = 'F',
3-
admin = ['province', 'municipality', 'barangay'],
4-
destination = ['mpa'],
3+
// admin = ['province', 'municipality', 'barangay'],
4+
// destination = ['mpa'],
55
roadNetwork = ['openroads'],
66
layerControls = context.container().select('.layer-controls'),
77
mapControls = context.container().select('.map-controls');
@@ -17,13 +17,13 @@ iD.ui.MapOverlay = function(context) {
1717
return d.id === 'ornetwork';
1818
});
1919

20-
var municipalSource = background.find(function (d) {
21-
return d.id === 'municipality';
22-
});
20+
// var municipalSource = background.find(function (d) {
21+
// return d.id === 'municipality';
22+
// });
2323

24-
var projectSources = background.filter(function (d) {
25-
return d.type === 'wmts';
26-
});
24+
// var projectSources = background.filter(function (d) {
25+
// return d.type === 'wmts';
26+
// });
2727

2828
function map_overlay(selection) {
2929

@@ -93,29 +93,29 @@ iD.ui.MapOverlay = function(context) {
9393
activeOverlay,
9494
function (d) { return d.description; });
9595

96-
projectList.call(drawList,
97-
projectSources,
98-
'checkbox',
99-
'project',
100-
toggleOverlay,
101-
activeOverlay,
102-
function (d) { return d.description; });
103-
104-
governmentList.call(drawList,
105-
admin.slice(1, 2),
106-
'checkbox',
107-
'admin_level',
108-
getToggleSource(municipalSource),
109-
getActiveSource(municipalSource),
110-
description('admin_level'));
111-
112-
destinationList.call(drawList,
113-
destination,
114-
'checkbox',
115-
'destination',
116-
function () {},
117-
function () {},
118-
description('destination'));
96+
// projectList.call(drawList,
97+
// projectSources,
98+
// 'checkbox',
99+
// 'project',
100+
// toggleOverlay,
101+
// activeOverlay,
102+
// function (d) { return d.description; });
103+
104+
// governmentList.call(drawList,
105+
// admin.slice(1, 2),
106+
// 'checkbox',
107+
// 'admin_level',
108+
// getToggleSource(municipalSource),
109+
// getActiveSource(municipalSource),
110+
// description('admin_level'));
111+
112+
// destinationList.call(drawList,
113+
// destination,
114+
// 'checkbox',
115+
// 'destination',
116+
// function () {},
117+
// function () {},
118+
// description('destination'));
119119

120120
content.select('.toggle-switch input')
121121
.property('checked', context.background().showsLayer(gridSource));
@@ -218,48 +218,48 @@ iD.ui.MapOverlay = function(context) {
218218
roadToggle.on('click', toggleDropdown(roadNetworkContainer));
219219

220220
// projects
221-
var projectToggle = content.append('a')
222-
.text(t('map_overlay.projects'))
223-
.attr('href', '#')
224-
.classed('hide-toggle', true)
225-
.classed('expanded', true);
221+
// var projectToggle = content.append('a')
222+
// .text(t('map_overlay.projects'))
223+
// .attr('href', '#')
224+
// .classed('hide-toggle', true)
225+
// .classed('expanded', true);
226226

227-
var projectContainer = content.append('div')
228-
.attr('class', 'filters');
227+
// var projectContainer = content.append('div')
228+
// .attr('class', 'filters');
229229

230-
var projectList = projectContainer.append('ul')
231-
.attr('class', 'overlay-list');
230+
// var projectList = projectContainer.append('ul')
231+
// .attr('class', 'overlay-list');
232232

233-
projectToggle.on('click', toggleDropdown(projectContainer));
233+
// projectToggle.on('click', toggleDropdown(projectContainer));
234234

235235
// government layers
236-
var governmentToggle = content.append('a')
237-
.text(t('map_overlay.government'))
238-
.attr('href', '#')
239-
.classed('hide-toggle', true)
240-
.classed('expanded', true);
236+
// var governmentToggle = content.append('a')
237+
// .text(t('map_overlay.government'))
238+
// .attr('href', '#')
239+
// .classed('hide-toggle', true)
240+
// .classed('expanded', true);
241241

242-
var governmentFeatures = content.append('div')
243-
.attr('class', 'filters');
242+
// var governmentFeatures = content.append('div')
243+
// .attr('class', 'filters');
244244

245-
var governmentList = governmentFeatures.append('ul')
246-
.attr('class', 'overlay-list');
245+
// var governmentList = governmentFeatures.append('ul')
246+
// .attr('class', 'overlay-list');
247247

248-
governmentToggle.on('click', toggleDropdown(governmentFeatures));
248+
// governmentToggle.on('click', toggleDropdown(governmentFeatures));
249249

250-
var destinationToggle = content.append('a')
251-
.text(t('map_overlay.destination'))
252-
.attr('href', '#')
253-
.classed('hide-toggle', true)
254-
.classed('expanded', true);
250+
// var destinationToggle = content.append('a')
251+
// .text(t('map_overlay.destination'))
252+
// .attr('href', '#')
253+
// .classed('hide-toggle', true)
254+
// .classed('expanded', true);
255255

256-
var destinationContainer = content.append('div')
257-
.attr('class', 'filters');
256+
// var destinationContainer = content.append('div')
257+
// .attr('class', 'filters');
258258

259-
var destinationList = destinationContainer.append('ul')
260-
.attr('class', 'overlay-list');
259+
// var destinationList = destinationContainer.append('ul')
260+
// .attr('class', 'overlay-list');
261261

262-
destinationToggle.on('click', toggleDropdown(destinationContainer));
262+
// destinationToggle.on('click', toggleDropdown(destinationContainer));
263263

264264
if (gridSource) {
265265
content.append('span')

0 commit comments

Comments
 (0)