Merge branch 'master' of github.com:systemed/iD

This commit is contained in:
Tom MacWright
2013-01-25 16:28:26 -05:00
2 changed files with 12 additions and 13 deletions
+8 -8
View File
@@ -1,14 +1,14 @@
iD.actions.MoveWay = function(wayId, delta, projection) {
return function(graph) {
var way = graph.entity(wayId);
return graph.update(function (graph) {
var way = graph.entity(wayId);
_.uniq(way.nodes).forEach(function(id) {
var node = graph.entity(id),
start = projection(node.loc),
end = projection.invert([start[0] + delta[0], start[1] + delta[1]]);
graph = graph.replace(node.move(end));
_.uniq(way.nodes).forEach(function (id) {
var node = graph.entity(id),
start = projection(node.loc),
end = projection.invert([start[0] + delta[0], start[1] + delta[1]]);
graph = graph.replace(node.move(end));
});
});
return graph;
};
};
+4 -5
View File
@@ -12,11 +12,10 @@ iD.History = function() {
annotation = actions.pop();
}
var graph = stack[index].graph.update(function (graph) {
for (var i = 0; i < actions.length; i++) {
graph = actions[i](graph);
}
});
var graph = stack[index].graph;
for (var i = 0; i < actions.length; i++) {
graph = actions[i](graph);
}
return {graph: graph, annotation: annotation, imagery_used: imagery_used};
}