"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.measureSVG = measureSVG;
function measureSVG(system, element, clone = true) {
    const { foreground: { svg }, } = system;
    if (clone) {
        element = element.cloneNode(true);
        element.style.visibility = 'hidden';
        svg.appendChild(element);
    }
    const rect = element.getBoundingClientRect();
    const { x, y, width, height } = rect;
    if (clone) {
        svg.removeChild(element);
    }
    return {
        x,
        y,
        width,
        height,
    };
}
//# sourceMappingURL=measureSVG.js.map