Browse files

layerswitcher -> background

  • Loading branch information...
1 parent f81ce9d commit 239fa6258a375fe8fdc000e59d75c0393e29abd6 @jfirebaugh jfirebaugh committed Mar 5, 2013
Showing with 48 additions and 48 deletions.
  1. +1 −1 combobox.html
  2. +17 −17 css/app.css
  3. +1 −1 index.html
  4. +2 −2 js/id/ui.js
  5. +12 −12 js/id/ui/{layerswitcher.js → background.js}
  6. +1 −1 locale/da.js
  7. +1 −1 locale/de.js
  8. +1 −1 locale/en.js
  9. +1 −1 locale/es.js
  10. +1 −1 locale/fr.js
  11. +1 −1 locale/it.js
  12. +1 −1 locale/ja.js
  13. +1 −1 locale/lv.js
  14. +1 −1 locale/nl.js
  15. +1 −1 locale/pl.js
  16. +1 −1 locale/ru.js
  17. +1 −1 locale/tr.js
  18. +1 −1 locale/uk.js
  19. +1 −1 locale/vi.js
  20. +1 −1 test/index.html
View
2 combobox.html
@@ -61,7 +61,7 @@
<script src='js/id/ui/success.js'></script>
<script src='js/id/ui/loading.js'></script>
<script src='js/id/ui/account.js'></script>
- <script src='js/id/ui/layerswitcher.js'></script>
+ <script src='js/id/ui/background.js'></script>
<script src='js/id/ui/contributors.js'></script>
<script src='js/id/ui/geocoder.js'></script>
<script src='js/id/ui/geolocate.js'></script>
View
34 css/app.css
@@ -963,17 +963,17 @@ div.combobox {
border-top:0;
}
-/* Layer Switcher */
+/* Background Settings */
-.layerswitcher-control {
+.background-control {
top:190px;
}
.nudge-container {
margin-top: 10px;
}
-.layerswitcher-control .adjustments button {
+.background-control .adjustments button {
height:30px;
font-size:10px;
padding:0 5px 3px 5px;
@@ -982,7 +982,7 @@ div.combobox {
font-weight: bold;
}
-.layerswitcher-control .adjustments button:hover {
+.background-control .adjustments button:hover {
background:#ececec;
}
@@ -1012,7 +1012,7 @@ div.combobox {
border-left: 4px solid transparent;
}
-.layerswitcher-control .nudge {
+.background-control .nudge {
text-indent: -9999px;
overflow: hidden;
width:16.6666%;
@@ -1021,7 +1021,7 @@ div.combobox {
position: relative;
}
-.layerswitcher-control .nudge::after {
+.background-control .nudge::after {
content: '';
display: block;
position: absolute;
@@ -1031,35 +1031,35 @@ div.combobox {
width: 0;
}
-.layerswitcher-control .nudge.left::after {
+.background-control .nudge.left::after {
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-left: 5px solid #222;
}
-.layerswitcher-control .nudge.right::after {
+.background-control .nudge.right::after {
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-right: 5px solid #222;
}
-.layerswitcher-control .nudge.top::after {
+.background-control .nudge.top::after {
border-right: 5px solid transparent;
border-left: 5px solid transparent;
border-bottom: 5px solid #222;
}
-.layerswitcher-control .nudge.bottom::after {
+.background-control .nudge.bottom::after {
border-right: 5px solid transparent;
border-left: 5px solid transparent;
border-top: 5px solid #222;
}
-.layerswitcher-control .nudge:first-child {
+.background-control .nudge:first-child {
border-radius: 4px 0 0 4px;
}
-.layerswitcher-control .reset {
+.background-control .reset {
width: 33.3333%;
border-radius: 0 4px 4px 0;
}
@@ -1092,18 +1092,18 @@ div.combobox {
z-index: 9999;
}
-.layerswitcher-control li:hover .select-box,
-.layerswitcher-control li.selected .select-box {
+.background-control li:hover .select-box,
+.background-control li.selected .select-box {
border: 2px solid #7092ff;
background: rgba(89, 123, 231, .5);
opacity: .5;
}
-.layerswitcher-control li.selected:hover .select-box,
-.layerswitcher-control li.selected .select-box {
+.background-control li.selected:hover .select-box,
+.background-control li.selected .select-box {
opacity: 1;
}
-.layerswitcher-control .opacity {
+.background-control .opacity {
background:#222;
display:inline-block;
width:20px;
View
2 index.html
@@ -72,7 +72,7 @@
<script src='js/id/ui/success.js'></script>
<script src='js/id/ui/loading.js'></script>
<script src='js/id/ui/account.js'></script>
- <script src='js/id/ui/layerswitcher.js'></script>
+ <script src='js/id/ui/background.js'></script>
<script src='js/id/ui/modes.js'></script>
<script src='js/id/ui/contributors.js'></script>
<script src='js/id/ui/geocoder.js'></script>
View
4 js/id/ui.js
@@ -57,8 +57,8 @@ iD.ui = function(context) {
.call(iD.ui.Geocoder(context));
container.append('div')
- .attr('class', 'map-control layerswitcher-control')
- .call(iD.ui.LayerSwitcher(context));
+ .attr('class', 'map-control background-control')
+ .call(iD.ui.Background(context));
container.append('div')
.attr('class', 'map-control geolocate-control')
View
24 js/id/ui/layerswitcher.js → js/id/ui/background.js
@@ -1,4 +1,4 @@
-iD.ui.LayerSwitcher = function(context) {
+iD.ui.Background = function(context) {
var event = d3.dispatch('cancel', 'save'),
opacities = [1, 0.5, 0];
@@ -12,7 +12,7 @@ iD.ui.LayerSwitcher = function(context) {
});
}
- function layerswitcher(selection) {
+ function background(selection) {
var content = selection
.append('div').attr('class', 'content fillD map-overlay hide'),
@@ -24,8 +24,8 @@ iD.ui.LayerSwitcher = function(context) {
.append('button')
.attr('tabindex', -1)
.attr('class', 'fillD')
- .attr('title', t('layerswitcher.description'))
- .on('click.layerswitcher-toggle', toggle)
+ .attr('title', t('background.description'))
+ .on('click.background-toggle', toggle)
.call(tooltip);
button.append('span')
@@ -43,17 +43,17 @@ iD.ui.LayerSwitcher = function(context) {
}
function clickoutside(selection) {
- selection.on('click.layerswitcher-inside', function() {
+ selection.on('click.background-inside', function() {
return d3.event.stopPropagation();
});
- context.container().on('click.layerswitcher-outside', hide);
+ context.container().on('click.background-outside', hide);
}
var opa = content
.append('div')
.attr('class', 'opacity-options-wrapper');
- opa.append('h4').text(t('layerswitcher.title'));
+ opa.append('h4').text(t('background.title'));
var opacityList = opa.append('ul')
.attr('class', 'opacity-options');
@@ -74,7 +74,7 @@ iD.ui.LayerSwitcher = function(context) {
.enter()
.append('li')
.attr('data-original-title', function(d) {
- return t('layerswitcher.percent_brightness', { opacity: (d * 100) });
+ return t('background.percent_brightness', { opacity: (d * 100) });
})
.on('click.set-opacity', setOpacity)
.html("<div class='select-box'></div>")
@@ -162,7 +162,7 @@ iD.ui.LayerSwitcher = function(context) {
selectLayer(context.background().source());
}
- context.map().on('move.layerswitcher-update', _.debounce(update, 1000));
+ context.map().on('move.background-update', _.debounce(update, 1000));
var adjustments = content
.append('div')
@@ -180,7 +180,7 @@ iD.ui.LayerSwitcher = function(context) {
}
adjustments.append('a')
- .text(t('layerswitcher.fix_misalignment'))
+ .text(t('background.fix_misalignment'))
.attr('href', '#')
.classed('hide-toggle', true)
.classed('expanded', false)
@@ -208,7 +208,7 @@ iD.ui.LayerSwitcher = function(context) {
.on('click', nudge);
nudge_container.append('button')
- .text(t('layerswitcher.reset'))
+ .text(t('background.reset'))
.attr('class', 'reset')
.on('click', function() {
context.background().offset([0, 0]);
@@ -219,5 +219,5 @@ iD.ui.LayerSwitcher = function(context) {
selectLayer(context.background().source());
}
- return d3.rebind(layerswitcher, event, 'on');
+ return d3.rebind(background, event, 'on');
};
View
2 locale/da.js
@@ -188,7 +188,7 @@ locale.da = {
results: "{n} results for {search}"
},
- layerswitcher: {
+ background: {
title: "Baggrund",
description: "Baggrundsindstillinger",
percent_brightness: "{opacity}% lysstyrke",
View
2 locale/de.js
@@ -188,7 +188,7 @@ locale.de = {
results: "{n} results for {search}"
},
- layerswitcher: {
+ background: {
title: "Hintergrund",
description: "Hintergrundeinstellungen",
percent_brightness: "{opacity}% Helligkeit",
View
2 locale/en.js
@@ -188,7 +188,7 @@ locale.en = {
results: "{n} results for {search}"
},
- layerswitcher: {
+ background: {
title: "Background",
description: "Background Settings",
percent_brightness: "{opacity}% brightness",
View
2 locale/es.js
@@ -188,7 +188,7 @@ locale.es = {
results: "{n} results for {search}"
},
- layerswitcher: {
+ background: {
title: "Fondo", //"Background",
description: "Configuración de fondo", //"Background Settings",
percent_brightness: "{opacity}% brillo", //"{opacity}% brightness",
View
2 locale/fr.js
@@ -188,7 +188,7 @@ locale.fr = {
results: "{n} results for {search}"
},
- layerswitcher: {
+ background: {
title: "Fond de carte",
description: "Paramètres du fond de carte",
percent_brightness: "{opacity}% luminosité",
View
2 locale/it.js
@@ -188,7 +188,7 @@ locale.it = {
results: "{n} results for {search}"
},
- layerswitcher: {
+ background: {
title: "Sfondo",
description: "Impostazioni dello sfondo",
percent_brightness: "{opacity}% opacità",
View
2 locale/ja.js
@@ -188,7 +188,7 @@ locale.ja = {
results: "{n} results for {search}"
},
- layerswitcher: {
+ background: {
title: "背景画像",
description: "背景画像設定",
percent_brightness: "{opacity}% 輝度",
View
2 locale/lv.js
@@ -188,7 +188,7 @@ locale.lv = {
results: "{n} results for {search}"
},
- layerswitcher: {
+ background: {
title: "Fons",
description: "Fona iestatījumi",
percent_brightness: "{opacity}% caurspīdīgums",
View
2 locale/nl.js
@@ -188,7 +188,7 @@ locale.nl = {
results: "{n} results for {search}"
},
- layerswitcher: {
+ background: {
title: "Achtergrond",
description: "Achtergrondinstellingen",
percent_brightness: "{opacity}% helderheid",
View
2 locale/pl.js
@@ -188,7 +188,7 @@ locale.pl = {
results: "{n} results for {search}"
},
- layerswitcher: {
+ background: {
title: "Tło",
description: "Ustawienia tła",
percent_brightness: "jasność {opacity}%",
View
2 locale/ru.js
@@ -188,7 +188,7 @@ locale.ru = {
results: "{n} results for {search}"
},
- layerswitcher: {
+ background: {
title: "Подложка",
description: "Настройка подложки",
percent_brightness: "яркость {opacity}%",
View
2 locale/tr.js
@@ -188,7 +188,7 @@ locale.tr = {
results: "{n} results for {search}"
},
- layerswitcher: {
+ background: {
title: "Arkaplan",
description: "Arkaplan Ayarları",
percent_brightness: "{opacity}% parlaklık",
View
2 locale/uk.js
@@ -188,7 +188,7 @@ locale.uk = {
results: "{n} results for {search}"
},
- layerswitcher: {
+ background: {
title: "Фон",
description: "Налаштування фону",
percent_brightness: "прозорість {opacity}%",
View
2 locale/vi.js
@@ -188,7 +188,7 @@ locale.vi = {
results: "{n} kết quả cho {search}"
},
- layerswitcher: {
+ background: {
title: "Hình nền",
description: "Tùy chọn Hình nền",
percent_brightness: "Sáng {opacity}%",
View
2 test/index.html
@@ -75,7 +75,7 @@
<script src='../js/id/ui/success.js'></script>
<script src='../js/id/ui/loading.js'></script>
<script src='../js/id/ui/account.js'></script>
- <script src='../js/id/ui/layerswitcher.js'></script>
+ <script src='../js/id/ui/background.js'></script>
<script src='../js/id/ui/modes.js'></script>
<script src='../js/id/ui/contributors.js'></script>
<script src='../js/id/ui/geocoder.js'></script>

0 comments on commit 239fa62

Please sign in to comment.