mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-27 06:20:25 +01:00
25 lines
682 B
JavaScript
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;
|
|
};
|