From 1e0a1b87aca1c32c9db87cdc74c4e90b52424a42 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Wed, 21 Dec 2022 22:58:14 -0600 Subject: [PATCH] Fix not being centered at start --- src/data/layers/factory.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data/layers/factory.tsx b/src/data/layers/factory.tsx index 114f715..96940fc 100644 --- a/src/data/layers/factory.tsx +++ b/src/data/layers/factory.tsx @@ -81,8 +81,8 @@ function getDirection(dir: Direction) { } const factorySize = { - width: 6, - height: 6 + width: 2, + height: 2 }; const blockSize = 50; @@ -454,6 +454,7 @@ const factory = createLayer(id, () => { } loaded = true; + watchEffect(updateGraphics); }); (window as any).internal = compInternalData; (window as any).comp = components; @@ -773,7 +774,6 @@ const factory = createLayer(id, () => { graphicContainer.addChild(hoverSprite); } } - watchEffect(updateGraphics); const pointerDown = ref(false), pointerDrag = ref(false),