svg-engine
Version:
Create SVG files in Node.js
27 lines • 1.07 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.StructuralInstances = void 0;
const SVGInstance_js_1 = require("../../../node/instance/SVGInstance.js");
const SVGSVGInstance_js_1 = require("../../instances/SVGSVGInstance.js");
const SVGGroupInstance_js_1 = require("../../instances/SVGGroupInstance.js");
class StructuralInstances extends SVGInstance_js_1.SVGInstance {
addGroup() {
const group = new SVGGroupInstance_js_1.SVGGroupInstance(this);
this.appendInstance(group);
return group;
}
addSVG(width, height) {
if (typeof width !== "undefined" && typeof height !== "undefined") {
const svg = new SVGSVGInstance_js_1.SVGSVGInstance(width, height);
this.appendInstance(svg);
return svg;
}
else {
const svg = new SVGSVGInstance_js_1.SVGSVGInstance();
this.appendInstance(svg);
return svg;
}
}
}
exports.StructuralInstances = StructuralInstances;
//# sourceMappingURL=structuralInstances.js.map
;