mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-20 10:03:29 +00:00
20 lines
403 B
JavaScript
20 lines
403 B
JavaScript
iD.actions.CopyEntity = function(entity, deep) {
|
|
var newEntities = [];
|
|
|
|
var action = function(graph) {
|
|
newEntities = entity.copy(deep, graph);
|
|
|
|
for (var i = 0; i < newEntities.length; i++) {
|
|
graph = graph.replace(newEntities[i]);
|
|
}
|
|
|
|
return graph;
|
|
};
|
|
|
|
action.newEntities = function() {
|
|
return newEntities;
|
|
};
|
|
|
|
return action;
|
|
};
|