bill 2 år sedan
förälder
incheckning
9e940271a8
1 ändrade filer med 4 tillägg och 4 borttagningar
  1. 4 4
      src/sdk/association.ts

+ 4 - 4
src/sdk/association.ts

@@ -93,6 +93,10 @@ const associationModels = (sdk: SDK) => {
         if (loaded) {
           const modelShow = getModelShowVariable(item)
           watchEffect(() => {
+            item.position
+            selfUpdate || getSceneModel(item)?.changePosition(item.position)
+          }, {flush: 'sync'})
+          watchEffect(() => {
             item.bottom
             selfUpdate || getSceneModel(item)?.changeBottom(item.bottom)
           }, {flush: 'sync'})
@@ -101,10 +105,6 @@ const associationModels = (sdk: SDK) => {
             selfUpdate || getSceneModel(item)?.changeOpacity(item.opacity)
           }, {flush: 'sync'})
           watchEffect(() => {
-            item.position
-            selfUpdate || getSceneModel(item)?.changePosition(item.position)
-          }, {flush: 'sync'})
-          watchEffect(() => {
             item.rotation
             selfUpdate || getSceneModel(item)?.changeRotation(item.rotation)
           }, {flush: 'sync'})