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) {