mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-25 15:05:32 +00:00
23 lines
635 B
JavaScript
23 lines
635 B
JavaScript
iD.operations.Move = function(selection, context) {
|
|
var operation = function() {
|
|
context.enter(iD.modes.Move(context, selection));
|
|
};
|
|
|
|
operation.available = function() {
|
|
return selection.length > 1 ||
|
|
context.entity(selection[0]).type !== 'node';
|
|
};
|
|
|
|
operation.enabled = function() {
|
|
return iD.actions.Move(selection)
|
|
.enabled(context.graph());
|
|
};
|
|
|
|
operation.id = "move";
|
|
operation.keys = [t('operations.move.key')];
|
|
operation.title = t('operations.move.title');
|
|
operation.description = t('operations.move.description');
|
|
|
|
return operation;
|
|
};
|