return d3.rebind(context, dispatch, 'on');
};
-iD.version = '1.8.4';
+iD.version = '1.8.5';
(function() {
var detected = {};
var duration = 800,
selector = '.selected.shadow, .selected .shadow',
selected = d3.select(null),
- classed = [],
+ classed = '',
params = {},
done;
function run(surface, fromTo) {
var toFrom = (fromTo === 'from' ? 'to': 'from'),
currSelected = surface.selectAll(selector),
- currClassed = Array.prototype.slice.call(surface.node().classList),
+ currClassed = surface.attr('class'),
n = 0;
if (done || currSelected.empty()) {
return;
}
- if (!_.isEqual(currSelected, selected) || !_.isEqual(currClassed, classed)) {
+ if (!_.isEqual(currSelected, selected) || currClassed !== classed) {
selected.call(reset);
- classed = _.clone(currClassed);
+ classed = currClassed;
selected = currSelected.call(calcAnimationParams);
}
function showConflict(selection, index) {
if (index < 0 || index >= list.length) return;
- var parent = d3.select(selection.node().parentElement);
+ var parent = d3.select(selection.node().parentNode);
// enable save button if this is the last conflict being reviewed..
if (index === list.length - 1) {
.attr('type', 'radio')
.attr('name', function(d) { return d.id; })
.on('change', function(d, i) {
- var ul = this.parentElement.parentElement.parentElement;
+ var ul = this.parentNode.parentNode.parentNode;
ul.__data__.chosen = i;
choose(ul, d);
});
choices
.each(function(d, i) {
- var ul = this.parentElement;
+ var ul = this.parentNode;
if (ul.__data__.chosen === i) choose(ul, d);
});
}
function historyChanged() {
if (state === 'hide') return;
- var entity = context.hasEntity(id);
+ var entity = context.hasEntity(id),
+ graph = context.graph();
if (!entity) return;
- entityEditor.preset(context.presets().match(entity, context.graph()));
-
- var head = context.history().difference();
- entityEditor.modified(base && !_.isEqual(base.changes(), head.changes()));
-
+ entityEditor.preset(context.presets().match(entity, graph));
+ entityEditor.modified(base !== graph);
entityEditor(selection);
}
entityEditor.entityID = function(_) {
if (!arguments.length) return id;
id = _;
- entityEditor.preset(context.presets().match(context.entity(id), context.graph()));
+ base = context.graph();
+ entityEditor.preset(context.presets().match(context.entity(id), base));
entityEditor.modified(false);
- base = context.history().difference();
coalesceChanges = false;
return entityEditor;
};
// Update
items.selectAll('use')
.attr('href', function() {
- var entity = this.parentElement.parentElement.__data__;
+ var entity = this.parentNode.parentNode.__data__;
return '#icon-' + context.geometry(entity.id);
});
function address(selection) {
isInitialized = false;
- selection.selectAll('.preset-input-wrap')
- .remove();
-
- var center = entity.extent(context.graph()).center(),
- addressFormat;
+ wrap = selection.selectAll('.preset-input-wrap')
+ .data([0]);
// Enter
- wrap = selection.append('div')
+ wrap.enter()
+ .append('div')
.attr('class', 'preset-input-wrap');
+ var center = entity.extent(context.graph()).center(),
+ addressFormat;
+
iD.countryCode().search(center, function (err, countryCode) {
addressFormat = _.find(iD.data.addressFormats, function (a) {
return a && a.countryCodes && _.contains(a.countryCodes, countryCode);
"name": "Waste Basket",
"terms": "bin,rubbish,litter,trash,garbage"
},
+ "amenity/waste_disposal": {
+ "name": "Garbage Dumpster",
+ "terms": "rubbish,litter,trash"
+ },
"amenity/water_point": {
"name": "RV Drinking Water",
"terms": ""
"name": "Breakwater",
"terms": ""
},
+ "man_made/chimney": {
+ "name": "Chimney",
+ "terms": ""
+ },
"man_made/cutline": {
"name": "Cut line",
"terms": ""
"name": "Flagpole",
"terms": ""
},
+ "man_made/gasometer": {
+ "name": "Gasometer",
+ "terms": "gas holder"
+ },
+ "man_made/groyne": {
+ "name": "Groyne",
+ "terms": ""
+ },
"man_made/lighthouse": {
"name": "Lighthouse",
"terms": ""
"name": "Storage Tank",
"terms": "water,oil,gas,petrol"
},
+ "man_made/surveillance": {
+ "name": "Surveillance",
+ "terms": ""
+ },
"man_made/survey_point": {
"name": "Survey Point",
"terms": ""
"name": "Water Works",
"terms": ""
},
+ "man_made/works": {
+ "name": "Works",
+ "terms": "car assembly plant,aluminium processing plant,brewery,furniture manufacture factory,oil refinery,platic recycling"
+ },
"military/airfield": {
"name": "Airfield",
"terms": ""