mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-03-17 05:47:34 +08:00
Closeable color picker window
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { html } from "lit"
|
||||
import IDraggablePositionedTemplate from "./IDraggablePositionedTemplate"
|
||||
import MouseClickAction from "../input/mouse/MouseClickAction"
|
||||
import MouseMoveDraggable from "../input/mouse/MouseMoveDraggable"
|
||||
|
||||
/** @typedef {import("../element/WindowElement").default} WindowElement */
|
||||
@@ -22,6 +23,16 @@ export default class WindowTemplate extends IDraggablePositionedTemplate {
|
||||
})
|
||||
}
|
||||
|
||||
createInputObjects() {
|
||||
return [
|
||||
...super.createInputObjects(),
|
||||
new MouseClickAction(this.element.querySelector(".ueb-window-close"), this.element.blueprint, {},
|
||||
undefined,
|
||||
() => this.element.remove()
|
||||
),
|
||||
]
|
||||
}
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<div class="ueb-window">
|
||||
|
||||
Reference in New Issue
Block a user