Make elements default constructible, testing wip

This commit is contained in:
barsdeveloper
2022-12-24 15:29:12 +01:00
parent 7ed36f21e5
commit c3ab6478b0
53 changed files with 992 additions and 712 deletions

View File

@@ -1,16 +1,19 @@
import ColorHandlerTemplate from "../template/ColorHandlerTemplate"
import IDraggableControlElement from "./IDraggableControlElement"
/** @typedef {import("../template/ColorPickerWindowTemplate").default} ColorPickerWindowTemplate */
/**
* @template T
* @typedef {import("./WindowElement").default<T>} WindowElement
*/
/** @extends {IDraggableControlElement<Object, ColorHandlerTemplate>} */
export default class ColorHandlerElement extends IDraggableControlElement {
constructor() {
super({}, new ColorHandlerTemplate())
super()
super.initialize({}, new ColorHandlerTemplate())
}
static newObject() {
return new ColorHandlerElement()
}
initialize() {
// Initialized in the constructor, this method does nothing
}
}