mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-12 12:41:58 +02:00
988bfeb767
Also show correct key in operation tooltip.
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;
|
|
};
|