UNPKG

@rxdi/ui-kit

Version:

UI Components for building graphql-server website

32 lines 1.66 kB
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.VesicaComponent = void 0; const lit_html_1 = require("@rxdi/lit-html"); const vesica_service_1 = require("./vesica.service"); let VesicaComponent = class VesicaComponent extends lit_html_1.LitElement { drawCircle() { const strokeWidth = Math.floor(Math.random() * vesica_service_1.VesicaService.width + 1) / vesica_service_1.VesicaService.wres; const styles = vesica_service_1.VesicaService.style(vesica_service_1.VesicaService.color, "none", strokeWidth); return vesica_service_1.VesicaService.circle(100, styles); } }; VesicaComponent = __decorate([ (0, lit_html_1.Component)({ selector: 'rx-vesica', template() { return (0, lit_html_1.svg) ` <svg viewBox="-110 -110 220 220" xmlns="http://www.w3.org/2000/svg"> ${this.drawCircle()} ${vesica_service_1.VesicaService.generate()} </svg>`; }, }) ], VesicaComponent); exports.VesicaComponent = VesicaComponent; //# sourceMappingURL=vesica.component.js.map