mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-17 19:03:27 +08:00
Window introduced
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { html } from "lit"
|
||||
import MouseOpenWindow from "../input/mouse/MouseOpenWindow"
|
||||
import IInputPinTemplate from "./IInputPinTemplate"
|
||||
|
||||
/**
|
||||
@@ -20,6 +21,20 @@ export default class LinearColorPinTemplate extends IInputPinTemplate {
|
||||
this.#input = pin.querySelector(".ueb-pin-input")
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {PinElement} pin
|
||||
* @returns {IInput[]}
|
||||
*/
|
||||
createInputObjects(pin) {
|
||||
return [
|
||||
...super.createInputObjects(pin),
|
||||
new MouseOpenWindow(this.#input, pin.blueprint, {
|
||||
moveEverywhere: true,
|
||||
looseTarget: true
|
||||
})
|
||||
]
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {PinElement} pin
|
||||
*/
|
||||
@@ -40,11 +55,8 @@ export default class LinearColorPinTemplate extends IInputPinTemplate {
|
||||
renderInput(pin) {
|
||||
if (pin.isInput()) {
|
||||
return html`
|
||||
<span
|
||||
class="ueb-pin-input"
|
||||
data-linear-color="${pin.defaultValue.toString()}"
|
||||
style="--ueb-linear-color:rgba(${pin.defaultValue.toString()})"
|
||||
>
|
||||
<span class="ueb-pin-input" data-linear-color="${pin.defaultValue.toString()}"
|
||||
.style="--ueb-linear-color:rgba(${pin.defaultValue.toString()})">
|
||||
</span>
|
||||
`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user