From 4f0cde82e23d82efae9b1b581c711116dcda3330 Mon Sep 17 00:00:00 2001 From: Uri Shaked Date: Sat, 21 Jan 2023 12:57:40 +0200 Subject: [PATCH] fix(resistor): incorrect height + pinInfo positions --- src/resistor-element.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/resistor-element.ts b/src/resistor-element.ts index 52bdbf8..9e1329f 100644 --- a/src/resistor-element.ts +++ b/src/resistor-element.ts @@ -1,4 +1,4 @@ -import { html, LitElement } from 'lit'; +import { css, html, LitElement } from 'lit'; import { customElement, property } from 'lit/decorators.js'; import { ElementPin } from './pin'; @@ -29,10 +29,18 @@ export class ResistorElement extends LitElement { @property() value = '1000'; readonly pinInfo: ElementPin[] = [ - { name: '1', x: 0, y: 10, signals: [] }, - { name: '2', x: 58.8, y: 10, signals: [] }, + { name: '1', x: 0, y: 5.65, signals: [] }, + { name: '2', x: 58.8, y: 5.65, signals: [] }, ]; + static get styles() { + return css` + :host { + display: flex; + } + `; + } + private breakValue(value: number) { const exponent = value >= 1e10