mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-31 01:09:22 +02:00
Support modifying ways
This commit is contained in:
@@ -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 } };
|
||||
})
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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')
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user