Files
iD/js/id/operations/rotate.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

25 lines
682 B
JavaScript

iD.operations.Rotate = function(selection, context) {
var entityId = selection[0];
var operation = function() {
context.enter(iD.modes.RotateWay(context, entityId));
};
operation.available = function() {
return selection.length === 1 &&
context.entity(entityId).type === 'way' &&
context.entity(entityId).geometry() === 'area';
};
operation.enabled = function() {
return true;
};
operation.id = "rotate";
operation.keys = [t('operations.rotate.key')];
operation.title = t('operations.rotate.title');
operation.description = t('operations.rotate.description');
return operation;
};