36 lines
1.5 KiB
JavaScript
36 lines
1.5 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.createElement = createElement;
|
|
const SVGCircleElement_js_1 = require("../dom/elements/SVGCircleElement.js");
|
|
const SVGLineElement_js_1 = require("../dom/elements/SVGLineElement.js");
|
|
const SVGPathElement_js_1 = require("../dom/elements/SVGPathElement.js");
|
|
const SVGRectElement_js_1 = require("../dom/elements/SVGRectElement.js");
|
|
const SVGSVGElement_js_1 = require("../dom/elements/SVGSVGElement.js");
|
|
const SVGElement_js_1 = require("../dom/elements/SVGElement.js");
|
|
const SVGGroupElement_js_1 = require("../dom/elements/SVGGroupElement.js");
|
|
const SVGTextElement_js_1 = require("../dom/elements/SVGTextElement.js");
|
|
function createElement(tagName) {
|
|
if (tagName === "circle") {
|
|
return new SVGCircleElement_js_1.SVGCircleElement();
|
|
}
|
|
else if (tagName === "line") {
|
|
return new SVGLineElement_js_1.SVGLineElement();
|
|
}
|
|
else if (tagName === "path") {
|
|
return new SVGPathElement_js_1.SVGPathElement();
|
|
}
|
|
else if (tagName === "rect") {
|
|
return new SVGRectElement_js_1.SVGRectElement();
|
|
}
|
|
else if (tagName === "svg") {
|
|
return new SVGSVGElement_js_1.SVGSVGElement();
|
|
}
|
|
else if (tagName === "g") {
|
|
return new SVGGroupElement_js_1.SVGGroupElement();
|
|
}
|
|
else if (tagName === "text") {
|
|
return new SVGTextElement_js_1.SVGTextElement();
|
|
}
|
|
return new SVGElement_js_1.SVGElement(tagName);
|
|
}
|
|
//# sourceMappingURL=createElement.js.map
|