mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-01 17:03:42 +00:00
The guidelines here are: Entity methods: return a modified entity don't necessarily maintain whole-graph consistency Actions: return a modified graph always maintain whole-graph consistency call entity methods liberally generally don't call other actions
7 lines
290 B
JavaScript
7 lines
290 B
JavaScript
// https://github.com/openstreetmap/potlatch2/blob/master/net/systemeD/halcyon/connection/actions/AddNodeToWayAction.as
|
|
iD.actions.AddWayNode = function(wayId, nodeId, index) {
|
|
return function(graph) {
|
|
return graph.replace(graph.entity(wayId).addNode(nodeId, index));
|
|
};
|
|
};
|