mirror of
https://github.com/FoggedLens/iD.git
synced 2026-04-22 03:36:37 +02:00
9743ee282b
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.
8 lines
262 B
JavaScript
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');
|
|
};
|
|
};
|