Performance improvement

This commit is contained in:
barsdeveloper
2022-10-17 22:32:25 +02:00
parent 192f2a4c11
commit e8a35c81d0
17 changed files with 215 additions and 47 deletions

View File

@@ -33,10 +33,10 @@ export default class IDraggableTemplate extends ITemplate {
update(changedProperties) {
super.update(changedProperties)
if (changedProperties.has("locationX")) {
this.element.style.setProperty("--ueb-position-x", `${this.element.locationX}`)
this.element.style.left = `${this.element.locationX}px`
}
if (changedProperties.has("locationY")) {
this.element.style.setProperty("--ueb-position-y", `${this.element.locationY}`)
this.element.style.top = `${this.element.locationY}px`
}
}
}