Files
iD/js/id/operations/reverse.js
2013-02-01 17:31:32 -05:00

26 lines
674 B
JavaScript

iD.operations.Reverse = function(selection, context) {
var entityId = selection[0];
var operation = function() {
context.perform(
iD.actions.Reverse(entityId),
t('operations.reverse.annotation'));
};
operation.available = function() {
return selection.length === 1 &&
context.geometry(entityId) === 'line';
};
operation.enabled = function() {
return true;
};
operation.id = "reverse";
operation.key = t('operations.reverse.key');
operation.title = t('operations.reverse.title');
operation.description = t('operations.reverse.description');
return operation;
};