FLUJOS/BACK_BACK/node_modules/d3-selection/src/selection/clone.js
2025-11-07 00:06:12 +01:00

13 lines
453 B
JavaScript
Executable file

function selection_cloneShallow() {
var clone = this.cloneNode(false), parent = this.parentNode;
return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
}
function selection_cloneDeep() {
var clone = this.cloneNode(true), parent = this.parentNode;
return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
}
export default function(deep) {
return this.select(deep ? selection_cloneDeep : selection_cloneShallow);
}