Files
iD/js/id/actions/remove_way_node.js
T
John Firebaugh 9743ee282b More mode and action overhaul
Pass entities to actions via id; this allows safe composition
of actions that modify the same entity.

Fix remaining ghost node cases (#213).

Create more logical undo states when drawing.
2012-12-06 18:39:51 -05:00

8 lines
262 B
JavaScript

iD.actions.RemoveWayNode = function(wayId, nodeId) {
return function(graph) {
var way = graph.entity(wayId),
nodes = _.without(way.nodes, nodeId);
return graph.replace(way.update({nodes: nodes}), 'removed from a road');
};
};