|
|
Line 113: |
Line 113: |
| layerStyleMap[layerId] = style; | | layerStyleMap[layerId] = style; |
| layerStyleVisibility[layerId] = true; | | layerStyleVisibility[layerId] = true; |
|
| |
| var item = document.createElement('div');
| |
| item.innerHTML = '<div style="' +
| |
| 'background:' + colors.default + ';' +
| |
| '"></div> ' + layerId;
| |
|
| |
| item.addEventListener('click', function(e) {
| |
| layerStyleVisibility[layerId] = !layerStyleVisibility[layerId];
| |
| item.className = layerStyleVisibility[layerId] ? '' : 'hidden';
| |
| //layer.changed(); // FIXME: reference to proper layer (name is stored in layerId)
| |
| biomes.changed(); lakes.changed(), rivers.changed(); routes.changed(); towns.changed(); pois.changed(); realms.changed(); religions.changed(); cultures.changed();
| |
| });
| |
| layerList.appendChild(item);
| |
| }); | | }); |
|
| |
|