Window introduced

This commit is contained in:
barsdeveloper
2022-09-24 20:27:52 +02:00
parent bf2c3ec939
commit 9a4d323a87
27 changed files with 891 additions and 312 deletions

View File

@@ -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>
`
}