mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-03-06 15:47:30 +08:00
Mergin better performance branch
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user