Color picker improvements

This commit is contained in:
barsdeveloper
2022-10-16 13:56:38 +02:00
parent 0b19d89416
commit 192f2a4c11
23 changed files with 500 additions and 231 deletions

View File

@@ -0,0 +1,37 @@
import IDraggableElement from "./IDraggableElement"
/**
* @typedef {import("../element/WindowElement").default} WindowElement
* @typedef {import("../entity/IEntity").default} IEntity
* @typedef {import("../template/IDraggableControlTemplate").default} IDraggableControlTemplate
*/
/**
* @template {IEntity} T
* @template {IDraggableControlTemplate} U
* @extends {IDraggableElement<T, U>}
*/
export default class IDraggableControlElement extends IDraggableElement {
/** @type {WindowElement} */
windowElement
/**
* @param {T} entity
* @param {U} template
*/
constructor(entity, template) {
super(entity, template)
}
connectedCallback() {
super.connectedCallback()
this.windowElement = this.closest("ueb-window")
}
/** @param {Number[]} param0 */
setLocation([x, y]) {
super.setLocation(this.template.adjustLocation([x, y]))
}
}