UNPKG

svg-engine

Version:
23 lines 822 B
import { SVGInstance } from "../../../browser/instance/SVGInstance.js"; import { SVGSVGInstance } from "../../instances/SVGSVGInstance.js"; import { SVGGroupInstance } from "../../instances/SVGGroupInstance.js"; export class StructuralInstances extends SVGInstance { addGroup() { const group = new SVGGroupInstance(this); this.appendInstance(group); return group; } addSVG(width, height) { if (typeof width !== "undefined" && typeof height !== "undefined") { const svg = new SVGSVGInstance(width, height); this.appendInstance(svg); return svg; } else { const svg = new SVGSVGInstance(); this.appendInstance(svg); return svg; } } } //# sourceMappingURL=structuralInstances.js.map