bill před 4 měsíci
rodič
revize
7f0f62ba81

+ 4 - 2
src/components/actions-merge/index.vue

@@ -39,7 +39,8 @@ watch(
     if (props.single) {
       emit("update:current", null);
     }
-  }
+  },
+  { immediate: true }
 );
 watch(
   () => props.current,
@@ -47,7 +48,8 @@ watch(
     if (!current) return;
     const fn = current.action && current.action();
     fn && onCleanup(fn);
-  }
+  },
+  { immediate: true }
 );
 </script>
 

+ 0 - 1
src/hook/use-fly.ts

@@ -137,7 +137,6 @@ export const flyModel = (model: FuseModel, mode: "pano" | "fuse", f = false) =>
   if (getFuseModelShowVariable(model).value) {
     if (custom.currentModel === model && mode === custom.showMode) {
       if (!f) return;
-
       activeModel({ showMode: "fuse", active: undefined, fore: f });
     } else {
       activeModel({ showMode: mode, active: model, fore: f });

+ 8 - 3
src/sdk/association/fuseMode.ts

@@ -221,15 +221,20 @@ export const activeModel = (status: {
 
 export const associationModels = (sdk: SDK) => {
   sdk.sceneBus.on("modeChange", (data) => {
-    custom.showMode = data.mode;
     if (data.active) {
-      custom.currentModel = getFuseModel(data.active)!;
+      activeModel({ active: getFuseModel(data.active)!, showMode: data.mode })
+    }
+    custom.showMode = data.mode;
+
+    if (data.active && data.mode === 'pano') {
+      data.active.changeSelect(false)
     }
-    console.log('modeChange', data, custom.showMode)
   });
   sdk.sceneBus.on("panoModelChange", (data) => {
     custom.showMode = "pano";
     custom.currentModel = getFuseModel(data)!;
+    data.changeSelect(false)
+    // activeModel({ active: getFuseModel(data)!, showMode: 'pano' })
   });
 
   const getModels = () =>