function getBBox(elt) {
const clonedElt = elt.clone(true);
const svg = d3.create('svg');
svg.node().appendChild(clonedElt.node());
document.body.appendChild(svg.node());
const { x, y, width, height } = clonedElt.node().getBBox();
document.body.removeChild(svg.node());
return { x, y, width, height };
}