mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:50:33 +08:00
32 lines
802 B
JavaScript
32 lines
802 B
JavaScript
import IDraggableElement from "./IDraggableElement.js"
|
|
|
|
/**
|
|
* @typedef {import("../element/WindowElement.js").default} WindowElement
|
|
* @typedef {import("../entity/IEntity.js").default} IEntity
|
|
* @typedef {import("../template/IDraggableControlTemplate.js").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} x
|
|
* @param {Number} y
|
|
*/
|
|
setLocation(x, y) {
|
|
super.setLocation(...this.template.adjustLocation(x, y))
|
|
}
|
|
}
|