From 440afac5e3d14462570f2d2fdc801d9f84e5cfcc Mon Sep 17 00:00:00 2001 From: cha0s Date: Sun, 17 Jan 2021 11:18:15 -0600 Subject: [PATCH] fix: Cap --- packages/graphics/src/traits/visible.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/graphics/src/traits/visible.js b/packages/graphics/src/traits/visible.js index 840c6db..1fa8df5 100644 --- a/packages/graphics/src/traits/visible.js +++ b/packages/graphics/src/traits/visible.js @@ -173,13 +173,7 @@ export default () => class Visible extends decorate(Trait) { this.#container.rotation = this.entity.rotation; }, - traitAdded: (type) => { - if (-1 === [ - 'visible', - 'positioned', - ].indexOf(type)) { - return; - } + traitAdded: () => { this.synchronizePosition(); }, @@ -261,7 +255,7 @@ export default () => class Visible extends decorate(Trait) { } synchronizePosition() { - if (!this.entity.is('positioned')) { + if (!this.entity.is('Positioned')) { return; } if (!this.#container) {