mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-26 07:23:40 +00:00
This is a facade interface that ties together a bunch of different internal objects and will make it easier to write tests for behaviors, modes, and operations.
24 lines
605 B
JavaScript
24 lines
605 B
JavaScript
iD.operations.Move = function(selection, context) {
|
|
var entityId = selection[0];
|
|
|
|
var operation = function() {
|
|
context.enter(iD.modes.MoveWay(context, entityId));
|
|
};
|
|
|
|
operation.available = function() {
|
|
return selection.length === 1 &&
|
|
context.entity(entityId).type === 'way';
|
|
};
|
|
|
|
operation.enabled = function() {
|
|
return true;
|
|
};
|
|
|
|
operation.id = "move";
|
|
operation.key = t('operations.move.key');
|
|
operation.title = t('operations.move.title');
|
|
operation.description = t('operations.move.description');
|
|
|
|
return operation;
|
|
};
|