mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 17:23:02 +00:00
* Support move, rotate, reflect, delete post paste on multiselection * Improve text and error msgs for singular vs multi selections * Move `disabled` checks from actions to operations * Reproject center of rotation (closes #3667) * Cleanup tests
27 lines
623 B
JavaScript
27 lines
623 B
JavaScript
import { actionDeleteNode } from './delete_node';
|
|
import { actionDeleteRelation } from './delete_relation';
|
|
import { actionDeleteWay } from './delete_way';
|
|
|
|
|
|
export function actionDeleteMultiple(ids) {
|
|
var actions = {
|
|
way: actionDeleteWay,
|
|
node: actionDeleteNode,
|
|
relation: actionDeleteRelation
|
|
};
|
|
|
|
|
|
var action = function(graph) {
|
|
ids.forEach(function(id) {
|
|
if (graph.hasEntity(id)) { // It may have been deleted aready.
|
|
graph = actions[graph.entity(id).type](id)(graph);
|
|
}
|
|
});
|
|
|
|
return graph;
|
|
};
|
|
|
|
|
|
return action;
|
|
}
|