diff --git a/js/id/format/xml.js b/js/id/format/xml.js index 920ea3933..1c983bbd5 100644 --- a/js/id/format/xml.js +++ b/js/id/format/xml.js @@ -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 } }; }) diff --git a/js/id/renderer/map.js b/js/id/renderer/map.js index b25969ec7..fa30e1625 100644 --- a/js/id/renderer/map.js +++ b/js/id/renderer/map.js @@ -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)); diff --git a/js/id/ui/inspector.js b/js/id/ui/inspector.js index 0344bf0cd..58639401e 100644 --- a/js/id/ui/inspector.js +++ b/js/id/ui/inspector.js @@ -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') })); }); }