mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-19 06:58:32 +02:00
Purge a few more uses of d3.select, refs #595
This commit is contained in:
+5
-3
@@ -140,8 +140,10 @@ iD.ui = function (context) {
|
||||
var about = container.append('div')
|
||||
.attr('class','col12 about-block fillD pad1');
|
||||
|
||||
about.append('div')
|
||||
.attr('class', 'user-container')
|
||||
var userContainer = about.append('div')
|
||||
.attr('class', 'user-container');
|
||||
|
||||
userContainer
|
||||
.append('div')
|
||||
.attr('class', 'hello');
|
||||
|
||||
@@ -243,7 +245,7 @@ iD.ui = function (context) {
|
||||
map.centerZoom([-77.02271, 38.90085], 20);
|
||||
}
|
||||
|
||||
d3.select('.user-container').call(iD.ui.userpanel(connection)
|
||||
userContainer.call(iD.ui.userpanel(connection)
|
||||
.on('logout.editor', connection.logout)
|
||||
.on('login.editor', connection.authenticate));
|
||||
|
||||
|
||||
@@ -38,9 +38,8 @@ iD.ui.geocoder = function() {
|
||||
function setVisible(show) {
|
||||
button.classed('active', show);
|
||||
gcForm.classed('hide', !show);
|
||||
var input_node = d3.select('.map-overlay input').node();
|
||||
if (show) input_node.focus();
|
||||
else input_node.blur();
|
||||
if (show) inputNode.node().focus();
|
||||
else inputNode.node().blur();
|
||||
}
|
||||
|
||||
var button = selection.append('button')
|
||||
@@ -51,7 +50,7 @@ iD.ui.geocoder = function() {
|
||||
|
||||
var gcForm = selection.append('form');
|
||||
|
||||
gcForm.attr('class','content fillD map-overlay hide')
|
||||
var inputNode = gcForm.attr('class','content fillD map-overlay hide')
|
||||
.append('input')
|
||||
.attr({ type: 'text', placeholder: t('geocoder.find_a_place') })
|
||||
.on('keydown', keydown);
|
||||
|
||||
@@ -14,6 +14,7 @@ iD.ui.save = function(context) {
|
||||
.on('click', function() {
|
||||
|
||||
function commit(e) {
|
||||
|
||||
d3.select('.shaded').remove();
|
||||
var l = iD.ui.loading(t('uploading_changes'), true);
|
||||
connection.putChangeset(history.changes(), e.comment, history.imagery_used(), function(err, changeset_id) {
|
||||
@@ -40,6 +41,7 @@ iD.ui.save = function(context) {
|
||||
}));
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
if (history.hasChanges()) {
|
||||
|
||||
Reference in New Issue
Block a user