mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-28 03:24:43 +08:00
Color picker refactoring
This commit is contained in:
@@ -8,6 +8,7 @@ import IDraggableElement from "./IDraggableElement"
|
||||
* @typedef {import("./WindowElement").default<T>} WindowElement
|
||||
*/
|
||||
|
||||
/** @extends {IDraggableElement<Object, ColorHandlerTemplate>} */
|
||||
export default class ColorHandlerElement extends IDraggableElement {
|
||||
|
||||
/** @type {WindowElement<ColorPickerWindowTemplate>} */
|
||||
@@ -23,10 +24,8 @@ export default class ColorHandlerElement extends IDraggableElement {
|
||||
}
|
||||
|
||||
/** @param {Number[]} param0 */
|
||||
addLocation([x, y]) {
|
||||
super.addLocation([x, y])
|
||||
this.windowElement.windowOptions
|
||||
this.windowElement.template.color = this.computeColor()
|
||||
setLocation([x, y]) {
|
||||
super.setLocation(this.template.adjustLocation([x, y]))
|
||||
}
|
||||
|
||||
computeColor() {
|
||||
|
||||
@@ -91,6 +91,7 @@ export default class IElement extends LitElement {
|
||||
this.template.inputSetup()
|
||||
}
|
||||
|
||||
/** @param {Map<String, String>} */
|
||||
updated(changedProperties) {
|
||||
super.updated(changedProperties)
|
||||
this.template.updated(changedProperties)
|
||||
|
||||
Reference in New Issue
Block a user