Files
iD/js/id/actions/move.js
John Firebaugh 3e45afbc5e Move history annotation to History#perform/replace
Actions are too low-level for annotations.
2012-12-07 10:35:39 -05:00

9 lines
406 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}));
};
};