Types refactoring

This commit is contained in:
barsdeveloper
2022-04-05 23:25:03 +02:00
parent 7f223555db
commit 141784a3f3
16 changed files with 299 additions and 164 deletions

View File

@@ -6,17 +6,22 @@ import MouseMoveNodes from "../input/mouse/MouseMoveNodes"
/**
* @typedef {import("../template/SelectableDraggableTemplate").default} SelectableDraggableTemplate
* @typedef {import("../entity/IntegerEntity").default} IntegerEntity
* @typedef {import("../entity/IEntity").default} IEntity
*/
/**
* @template {IEntity} T
* @template {SelectableDraggableTemplate} U
* @extends {IElement<T, U>}
*/
export default class ISelectableDraggableElement extends IElement {
constructor(...args) {
// @ts-expect-error
super(...args)
this.dragObject = null
this.location = [0, 0]
this.selected = false
/** @type {SelectableDraggableTemplate} */
this.template
let self = this
this.dragHandler = (e) => {