Files
iD/js/id/operations/move.js
2013-01-29 18:45:10 -05:00

24 lines
564 B
JavaScript

iD.operations.Move = function(entityId, mode) {
var history = mode.map.history();
var operation = function() {
mode.controller.enter(iD.modes.MoveWay(entityId));
};
operation.available = function() {
var graph = history.graph();
return graph.entity(entityId).type === 'way';
};
operation.enabled = function() {
return true;
};
operation.id = "move";
operation.key = "M";
operation.title = "Move";
operation.description = "Move this to a different location";
return operation;
};