bill 4 mesi fa
parent
commit
a780ecfa6d

+ 0 - 1
src/sdk/association/animation.ts

@@ -427,7 +427,6 @@ watch(play, (_a, _b, onCleanup) => {
   play.value ? animationGroup?.play() : animationGroup?.pause();
   onCleanup(
     watchEffect(() => {
-      console.error('endTime.value', endTime.value)
       if (currentTime.value >= endTime.value) {
         play.value = false;
       }

+ 17 - 8
src/views/animation/index.vue

@@ -66,15 +66,25 @@ import {
 
 enterEdit(() => router.back());
 useViewStack(autoSaveAnimationModel);
-useViewStack(() =>
-  mergeFuns(
+useViewStack(() => {
+  return mergeFuns(
     showBottomBarStack.push(ref(true)),
-    showRightPanoStack.push(computed(() => !!focusAM.value && !play.value)),
-    showLeftPanoStack.push(computed(() => !play.value)),
+    showRightPanoStack.push(ref(true)),
+    showLeftPanoStack.push(ref(true)),
     showLeftCtrlPanoStack.push(computed(() => !play.value)),
-    showSearchStack.push(computed(() => !play.value))
-  )
-);
+    showSearchStack.push(computed(() => !play.value)),
+    watchEffect((onCleanup) => {
+      const cleanups: any[] = [];
+      if (play.value || activeAttrib.value?.key === "frames") {
+        cleanups.push(showRightPanoStack.push(ref(false)));
+      }
+      if (play.value) {
+        cleanups.push(showLeftPanoStack.push(ref(false)));
+      }
+      onCleanup(mergeFuns(cleanups));
+    })
+  );
+});
 
 const focusAM = ref<AnimationModel>();
 const activeAttrib = ref<Active>();
@@ -86,7 +96,6 @@ const amM = computed(() => focusAM.value && amMap[getAMKey(focusAM.value)]);
 
 onUnmounted(() => (currentTime.value = 0));
 
-
 const asyncOper = (item: AnimationModel, oper: (obj: AnimationModel3D) => void) => {
   let onCleanup = () => {};
   if (amMap[getAMKey(item)]?.am) {

+ 0 - 6
src/views/animation/right/index.vue

@@ -48,9 +48,6 @@ import Subtitle from "./subtitle.vue";
 import { checkTLItem } from "@/components/drawing-time-line/check";
 import { Message } from "bill/expose-common";
 import { AnimationModel, AnimationModelFrame } from "@/store/animation";
-import { useViewStack } from "@/hook";
-import { showRightPanoStack } from "@/env";
-import { computed } from "vue";
 
 const props = defineProps<{
   am: AnimationModel;
@@ -64,9 +61,6 @@ const emit = defineEmits<{
   (e: "changeFrameAction", d: { action?: string; frame: AnimationModelFrame }): void;
 }>();
 
-useViewStack(() =>
-  showRightPanoStack.push(computed(() => props.activeAttrib?.key !== "frames"))
-);
 const comps = {
   actions: Action,
   paths: Path,