iD constructors are camel case

This commit is contained in:
John Firebaugh
2013-02-12 16:28:02 -08:00
parent 50e01150a7
commit 1e60b0b7fa
14 changed files with 22 additions and 22 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ iD.behavior.Lasso = function(context) {
pos = [d3.event.clientX, d3.event.clientY];
lasso = iD.ui.lasso().a(d3.mouse(context.surface().node()));
lasso = iD.ui.Lasso().a(d3.mouse(context.surface().node()));
context.surface().call(lasso);
+1 -1
View File
@@ -4,7 +4,7 @@ iD.modes.Select = function(context, selection, initial) {
button: 'browse'
};
var inspector = iD.ui.inspector().initial(!!initial),
var inspector = iD.ui.Inspector().initial(!!initial),
keybinding = d3.keybinding('select'),
timeout = null,
behaviors = [
+3 -3
View File
@@ -47,7 +47,7 @@ iD.ui = function(context) {
container.append('div')
.attr('class', 'map-control layerswitcher-control')
.call(iD.ui.layerswitcher(context));
.call(iD.ui.LayerSwitcher(context));
container.append('div')
.attr('class', 'map-control geolocate-control')
@@ -103,7 +103,7 @@ iD.ui = function(context) {
linkList.append('li')
.attr('id', 'user-list')
.call(iD.ui.contributors(context));
.call(iD.ui.Contributors(context));
window.onbeforeunload = function() {
history.save();
@@ -142,7 +142,7 @@ iD.ui = function(context) {
map.centerZoom([-77.02271, 38.90085], 20);
}
userContainer.call(iD.ui.userpanel(connection)
userContainer.call(iD.ui.UserPanel(connection)
.on('logout.editor', connection.logout)
.on('login.editor', connection.authenticate));
+1 -1
View File
@@ -1,4 +1,4 @@
iD.ui.commit = function(context) {
iD.ui.Commit = function(context) {
var event = d3.dispatch('cancel', 'save', 'fix');
function zipSame(d) {
+1 -1
View File
@@ -1,4 +1,4 @@
iD.ui.contributors = function(context) {
iD.ui.Contributors = function(context) {
function update(selection) {
var users = {},
limit = 3,
+1 -1
View File
@@ -64,7 +64,7 @@ iD.ui.Geocoder = function(context) {
function setVisible(show) {
if (show !== shown) {
button.classed('active', show);
gcForm.call(iD.ui.toggle(show));
gcForm.call(iD.ui.Toggle(show));
if (!show) resultsList.classed('hide', !show);
if (show) inputNode.node().focus();
else inputNode.node().blur();
+2 -2
View File
@@ -1,4 +1,4 @@
iD.ui.inspector = function() {
iD.ui.Inspector = function() {
var event = d3.dispatch('changeTags', 'close'),
taginfo = iD.taginfo(),
initial = false,
@@ -43,7 +43,7 @@ iD.ui.inspector = function() {
.attr('class', 'inspector-buttons pad1 fillD')
.call(drawButtons);
inspector.call(iD.ui.toggle(true));
inspector.call(iD.ui.Toggle(true));
}
function drawHead(selection) {
+3 -3
View File
@@ -1,4 +1,4 @@
iD.ui.lasso = function() {
iD.ui.Lasso = function() {
var center, box,
group,
@@ -13,7 +13,7 @@ iD.ui.lasso = function() {
box = group.append('rect')
.attr('class', 'lasso-box');
group.call(iD.ui.toggle(true));
group.call(iD.ui.Toggle(true));
}
@@ -50,7 +50,7 @@ iD.ui.lasso = function() {
lasso.close = function(selection) {
if (group) {
group.call(iD.ui.toggle(false, function() {
group.call(iD.ui.Toggle(false, function() {
d3.select(this).remove();
}));
}
+2 -2
View File
@@ -1,4 +1,4 @@
iD.ui.layerswitcher = function(context) {
iD.ui.LayerSwitcher = function(context) {
var event = d3.dispatch('cancel', 'save'),
opacities = [1, 0.5, 0];
@@ -36,7 +36,7 @@ iD.ui.layerswitcher = function(context) {
function setVisible(show) {
if (show !== shown) {
button.classed('active', show);
content.call(iD.ui.toggle(show));
content.call(iD.ui.Toggle(show));
shown = show;
}
}
+2 -2
View File
@@ -17,7 +17,7 @@ iD.ui.Save = function(context) {
modal.select('.content')
.classed('commit-modal', true)
.datum(changes)
.call(iD.ui.commit(context)
.call(iD.ui.Commit(context)
.on('cancel', function() {
modal.remove();
})
@@ -60,7 +60,7 @@ iD.ui.Save = function(context) {
id: changeset_id,
comment: e.comment
})
.call(iD.ui.success(connection)
.call(iD.ui.Success(connection)
.on('cancel', function() {
modal.remove();
}));
+1 -1
View File
@@ -1,4 +1,4 @@
iD.ui.success = function(connection) {
iD.ui.Success = function(connection) {
var event = d3.dispatch('cancel', 'save');
function success(selection) {
+1 -1
View File
@@ -2,7 +2,7 @@
// hide class, which sets display=none, and a d3 transition for opacity.
// this will cause blinking when called repeatedly, so check that the
// value actually changes between calls.
iD.ui.toggle = function(show, callback) {
iD.ui.Toggle = function(show, callback) {
return function(selection) {
selection.style('opacity', show ? 0 : 1)
.classed('hide', false)
+1 -1
View File
@@ -1,4 +1,4 @@
iD.ui.userpanel = function(connection) {
iD.ui.UserPanel = function(connection) {
var event = d3.dispatch('logout', 'login');
function user(selection) {
+2 -2
View File
@@ -1,10 +1,10 @@
describe("iD.ui.inspector", function () {
describe("iD.ui.Inspector", function () {
var inspector, element,
tags = {highway: 'residential'},
entity, graph, context;
function render() {
inspector = iD.ui.inspector().context(context);
inspector = iD.ui.Inspector().context(context);
element = d3.select('body')
.append('div')
.attr('id', 'inspector-wrap')