mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-06 19:31:41 +00:00
@@ -108,13 +108,5 @@ iD.data.deprecated = [
|
||||
shop: 'supermarket',
|
||||
organic: 'only'
|
||||
}
|
||||
},
|
||||
// entirely discarded tags
|
||||
{ old: { 'tiger:upload_uuid': '*' } },
|
||||
{ old: { 'tiger:tlid': '*' } },
|
||||
{ old: { 'tiger:source': '*' } },
|
||||
{ old: { 'tiger:separated': '*' } },
|
||||
{ old: { 'geobase:datasetName': '*' } },
|
||||
{ old: { 'geobase:uuid': '*' } },
|
||||
{ old: { 'sub_sea:type': '*' } }
|
||||
}
|
||||
];
|
||||
|
||||
10
data/discarded.js
Normal file
10
data/discarded.js
Normal file
@@ -0,0 +1,10 @@
|
||||
// entirely discarded tags
|
||||
iD.data.discarded = [
|
||||
'tiger:upload_uuid',
|
||||
'tiger:tlid',
|
||||
'tiger:source',
|
||||
'tiger:separated',
|
||||
'geobase:datasetName',
|
||||
'geobase:uuid',
|
||||
'sub_sea:type'
|
||||
];
|
||||
@@ -35,6 +35,7 @@
|
||||
<script src='data/data.js'></script>
|
||||
<script src='data/deprecated.js'></script>
|
||||
<script src='data/imagery.js'></script>
|
||||
<script src='data/discarded.js'></script>
|
||||
|
||||
<script src="js/id/geo.js"></script>
|
||||
<script src="js/id/geo/extent.js"></script>
|
||||
|
||||
@@ -42,7 +42,7 @@ iD.behavior.Select = function(context) {
|
||||
selection.on('mousemove.select', null);
|
||||
};
|
||||
// save the event for the click handler
|
||||
})(d3.event), 400);
|
||||
})(d3.event), 200);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,11 @@ iD.History = function(context) {
|
||||
graph = actions[i](graph);
|
||||
}
|
||||
|
||||
return {graph: graph, annotation: annotation, imagery_used: imagery_used};
|
||||
return {
|
||||
graph: graph,
|
||||
annotation: annotation,
|
||||
imagery_used: imagery_used
|
||||
};
|
||||
}
|
||||
|
||||
function change(previous) {
|
||||
@@ -128,9 +132,16 @@ iD.History = function(context) {
|
||||
|
||||
changes: function() {
|
||||
var difference = history.difference();
|
||||
|
||||
function discardTags(entity) {
|
||||
return entity.update({
|
||||
tags: _.omit(entity.tags, iD.data.discarded)
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
modified: difference.modified(),
|
||||
created: difference.created(),
|
||||
modified: difference.modified().map(discardTags),
|
||||
created: difference.created().map(discardTags),
|
||||
deleted: difference.deleted()
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user