mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Restore source switch for development
This commit is contained in:
@@ -211,8 +211,13 @@
|
||||
|
||||
iD.data.load(function() {
|
||||
id = iD();
|
||||
|
||||
d3.select("#id-container")
|
||||
.call(id.ui());
|
||||
|
||||
d3.select("#about").insert('li', '.user-list')
|
||||
.attr('class', 'source-switch')
|
||||
.call(iD.ui.SourceSwitch(id));
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -5,10 +5,11 @@ iD.ui.SourceSwitch = function(context) {
|
||||
if (context.history().hasChanges() &&
|
||||
!window.confirm(t('source_switch.lose_changes'))) return;
|
||||
|
||||
var live = d3.select(this).classed('live');
|
||||
var live = d3.select(this)
|
||||
.classed('live');
|
||||
|
||||
context.connection()
|
||||
.url(live ? 'http://api06.dev.openstreetmap.org' : 'http://www.openstreetmap.org');
|
||||
.switch(live ? iD.data.keys[1] : iD.data.keys[0]);
|
||||
|
||||
context.map()
|
||||
.flush();
|
||||
|
||||
Reference in New Issue
Block a user