mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-18 19:47:32 +08:00
Various color picker fixes
This commit is contained in:
@@ -10,6 +10,7 @@ import WindowElement from "../element/WindowElement"
|
||||
* @typedef {import("../entity/LinearColorEntity").default} LinearColorEntity
|
||||
*/
|
||||
|
||||
/** @extends IInputPinTemplate<LinearColorEntity> */
|
||||
export default class LinearColorPinTemplate extends IInputPinTemplate {
|
||||
|
||||
/** @type {HTMLInputElement} */
|
||||
@@ -40,7 +41,9 @@ export default class LinearColorPinTemplate extends IInputPinTemplate {
|
||||
})
|
||||
this.element.blueprint.append(this.#window)
|
||||
const windowApplyHandler = () => {
|
||||
this.element.color = /** @type {ColorPickerWindowTemplate} */(this.#window.template).color
|
||||
this.element.setDefaultValue(
|
||||
/** @type {ColorPickerWindowTemplate} */(this.#window.template).color
|
||||
)
|
||||
}
|
||||
const windowCloseHandler = () => {
|
||||
this.#window.removeEventListener(Configuration.windowApplyEventName, windowApplyHandler)
|
||||
|
||||
Reference in New Issue
Block a user