mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-18 03:27:32 +08:00
Make elements default constructible, testing wip
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import IDraggableTemplate from "./IDraggableTemplate"
|
||||
|
||||
/** @typedef {import("../element/IDraggableElement").default} IDraggableElement */
|
||||
/**
|
||||
* @typedef {import("../element/IDraggableElement").default} IDraggableElement
|
||||
* @typedef {import("lit").PropertyValues} PropertyValues
|
||||
*/
|
||||
|
||||
/**
|
||||
* @template {IDraggableElement} T
|
||||
@@ -8,7 +11,7 @@ import IDraggableTemplate from "./IDraggableTemplate"
|
||||
*/
|
||||
export default class IDraggablePositionedTemplate extends IDraggableTemplate {
|
||||
|
||||
/** @param {Map} changedProperties */
|
||||
/** @param {PropertyValues} changedProperties */
|
||||
update(changedProperties) {
|
||||
super.update(changedProperties)
|
||||
if (changedProperties.has("locationX")) {
|
||||
@@ -18,4 +21,4 @@ export default class IDraggablePositionedTemplate extends IDraggableTemplate {
|
||||
this.element.style.top = `${this.element.locationY}px`
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user