Support modifying ways

This commit is contained in:
Tom MacWright
2012-11-28 16:39:48 -05:00
parent f7d1a5eb72
commit 79204f1e5f
3 changed files with 3 additions and 2 deletions

View File

@@ -93,6 +93,7 @@ iD.format.XML = {
nd: entity.nodes.map(function(e) {
return { keyAttributes: { ref: e.id.replace('n', '') } };
}),
'@version': (entity.version || 0),
tag: _.map(entity.tags, function(v, k) {
return { keyAttributes: { k: k, v: v } };
})

View File

@@ -376,7 +376,7 @@ iD.Map = function(elem, connection) {
inspector.on('changeTags', function(d, tags) {
var entity = map.history.graph().entity(d.id);
map.perform(iD.actions.changeTags(entity, tags));
}).on('changeWayDirection', function(d, tags) {
}).on('changeWayDirection', function(d) {
map.perform(iD.actions.changeWayDirection(d));
}).on('remove', function(d) {
map.perform(iD.actions.remove(d));

View File

@@ -32,7 +32,7 @@ iD.Inspector = function() {
.text('Reverse Direction')
.on('click', function(d) {
event.changeWayDirection(iD.Entity(d, {
nodes: _.pluck(d.nodes.slice().reverse(), 'id')
nodes: _.pluck(d.nodes.reverse(), 'id')
}));
});
}