Files
iD/js/id/operations/reverse.js
John Firebaugh 988bfeb767 Support both delete and backspace (fixes #887)
Also show correct key in operation tooltip.
2013-03-04 17:12:44 -08:00

26 lines
677 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.keys = [t('operations.reverse.key')];
operation.title = t('operations.reverse.title');
operation.description = t('operations.reverse.description');
return operation;
};