Files
iD/js/id/operations/move.js
T
John Firebaugh 402a9424c0 Make selection an array of entity IDs
Should have no visible effect yet.
2013-01-31 13:51:12 -05:00

26 lines
674 B
JavaScript

iD.operations.Move = function(selection, mode) {
var entityId = selection[0],
history = mode.map.history();
var operation = function() {
mode.controller.enter(iD.modes.MoveWay(entityId));
};
operation.available = function() {
var graph = history.graph();
return selection.length === 1 &&
graph.entity(entityId).type === 'way';
};
operation.enabled = function() {
return true;
};
operation.id = "move";
operation.key = t('operations.move.key');
operation.title = t('operations.move.title');
operation.description = t('operations.move.description');
return operation;
};