Various color picker improvements

This commit is contained in:
barsdeveloper
2022-10-22 23:06:37 +02:00
parent 14d376d447
commit acea290c9d
23 changed files with 562 additions and 279 deletions

View File

@@ -0,0 +1,21 @@
import IDraggableTemplate from "./IDraggableTemplate"
/** @typedef {import("../element/IDraggableElement").default} IDraggableElement */
/**
* @template {IDraggableElement} T
* @extends {IDraggableTemplate<T>}
*/
export default class IDraggablePositionedTemplate extends IDraggableTemplate {
/** @param {Map} changedProperties */
update(changedProperties) {
super.update(changedProperties)
if (changedProperties.has("locationX")) {
this.element.style.left = `${this.element.locationX}px`
}
if (changedProperties.has("locationY")) {
this.element.style.top = `${this.element.locationY}px`
}
}
}