Files
ueblueprint/js/element/IDraggableControlElement.js
2022-12-24 15:29:12 +01:00

29 lines
761 B
JavaScript

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
setup() {
super.setup()
this.windowElement = this.closest("ueb-window")
}
/** @param {Number[]} param0 */
setLocation([x, y]) {
super.setLocation(this.template.adjustLocation([x, y]))
}
}