import * as TSU from "@panyam/tsutils";
export class LineView {
    constructor(rootElement, line, config) {
        this.rootElement = rootElement;
        this.line = line;
        this.config = config;
        this.roleSpacing = 20;
        this.rowSpacing = 10;
        this.gElem = TSU.DOM.createSVGNode("g", {
            parent: this.rootElement,
            attrs: {
                class: "lineRoot",
                id: "lineRoot" + this.line.uuid,
            },
        });
    }
    wrapToSize() {
        const bbox = this.gElem.getBBox();
        this.rootElement.setAttribute("width", "" + (4 + bbox.width));
        this.rootElement.setAttribute("height", "" + (15 + bbox.height));
        this.gElem.setAttribute("transform", `translate(${4 - bbox.x}, ${4 - bbox.y})`);
    }
    get prefSize() {
        const bbox = this.rootElement.getBBox();
        return new TSU.Geom.Size(4 + bbox.width, 4 + bbox.height);
    }
}
//# sourceMappingURL=LineView.js.map