UNPKG

588 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.createElement = void 0;
4const g_1 = require("@antv/g");
5function createElement(descriptor) {
6 const render = typeof descriptor === 'function' ? descriptor : descriptor.render;
7 return class extends g_1.CustomElement {
8 connectedCallback() {
9 this.draw();
10 }
11 attributeChangedCallback() {
12 this.draw();
13 }
14 draw() {
15 render(this);
16 }
17 };
18}
19exports.createElement = createElement;
20//# sourceMappingURL=createElement.js.map
\No newline at end of file