mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-27 10:44:43 +08:00
Performance improvement
This commit is contained in:
@@ -12,16 +12,16 @@ export default class IFromToPositionedTemplate extends ITemplate {
|
||||
update(changedProperties) {
|
||||
super.update(changedProperties)
|
||||
if (changedProperties.has("initialPositionX")) {
|
||||
this.element.style.setProperty("--ueb-from-x", `${this.element.initialPositionX}`)
|
||||
this.element.style.setProperty("--ueb-from-x", `${Math.round(this.element.initialPositionX)}`)
|
||||
}
|
||||
if (changedProperties.has("initialPositionY")) {
|
||||
this.element.style.setProperty("--ueb-from-y", `${this.element.initialPositionY}`)
|
||||
this.element.style.setProperty("--ueb-from-y", `${Math.round(this.element.initialPositionY)}`)
|
||||
}
|
||||
if (changedProperties.has("finaPositionX")) {
|
||||
this.element.style.setProperty("--ueb-to-x", `${this.element.finaPositionX}`)
|
||||
this.element.style.setProperty("--ueb-to-x", `${Math.round(this.element.finaPositionX)}`)
|
||||
}
|
||||
if (changedProperties.has("finaPositionY")) {
|
||||
this.element.style.setProperty("--ueb-to-y", `${this.element.finaPositionY}`)
|
||||
this.element.style.setProperty("--ueb-to-y", `${Math.round(this.element.finaPositionY)}`)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user