Mergin better performance branch

This commit is contained in:
barsdeveloper
2022-09-04 14:33:22 +02:00
parent 47c15fbf8d
commit 715dee6a5a
97 changed files with 2725 additions and 2833 deletions

View File

@@ -1,11 +1,9 @@
// @ts-check
import html from "./html"
import { html } from "lit"
import IInputPinTemplate from "./IInputPinTemplate"
/**
* @typedef {import("../element/PinElement").default} PinElement
* @typedef {import("../entity/LinearColorEntity").default} LinearColorEntity)}
* @typedef {import("../entity/LinearColorEntity").default} LinearColorEntity}
*/
export default class LinearColorPinTemplate extends IInputPinTemplate {
@@ -15,12 +13,11 @@ export default class LinearColorPinTemplate extends IInputPinTemplate {
/**
* @param {PinElement} pin
* @param {Map} changedProperties
*/
setup(pin) {
super.setup(pin)
firstUpdated(pin, changedProperties) {
super.firstUpdated(pin, changedProperties)
this.#input = pin.querySelector(".ueb-pin-input")
this.#input.dataset.linearColor = /** @type {LinearColorEntity} */(pin.entity.DefaultValue).toString()
let self = this
}
/**
@@ -32,7 +29,7 @@ export default class LinearColorPinTemplate extends IInputPinTemplate {
/**
* @param {PinElement} pin
* @param {String[]?} value
* @param {String[]} value
*/
setInputs(pin, value = []) {
}
@@ -43,7 +40,7 @@ export default class LinearColorPinTemplate extends IInputPinTemplate {
renderInput(pin) {
if (pin.isInput()) {
return html`
<span class="ueb-pin-input"></span>
<span class="ueb-pin-input" data-linear-color="${pin.defaultValue.toString()}"></span>
`
}
return super.renderInput(pin)