mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-26 18:07:50 +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.
9 lines
426 B
JavaScript
9 lines
426 B
JavaScript
// https://github.com/openstreetmap/josm/blob/mirror/src/org/openstreetmap/josm/command/MoveCommand.java
|
|
// https://github.com/openstreetmap/potlatch2/blob/master/net/systemeD/halcyon/connection/actions/MoveNodeAction.as
|
|
iD.actions.Move = function(entityId, loc) {
|
|
return function(graph) {
|
|
var entity = graph.entity(entityId);
|
|
return graph.replace(entity.update({loc: loc}), 'moved an element');
|
|
};
|
|
};
|