bill 8 hónapja
szülő
commit
929e8fb9b7

+ 3 - 0
src/components/path/sign.vue

@@ -48,6 +48,9 @@ const path = sdk.createPath({
 
 watchEffect(() => path.visibilityName(props.path.showName));
 watchEffect(() => path.changeFontSize(props.path.fontSize));
+watchEffect(() => {
+  path.changeDirection(props.path.showDirection, props.path.reverseDirection);
+});
 
 watchEffect(() => {
   const range = props.path.globalVisibility ? -1 : props.path.visibilityRange;

+ 6 - 2
src/sdk/association/path.ts

@@ -1,10 +1,11 @@
 import { diffArrayChange, mount, shallowWatchArray } from "@/utils";
 import TaggingComponent from "@/components/path/list.vue";
 import { Path as PathData, paths } from "@/store/path";
-import { Path, SDK } from "../sdk";
+import { sdk, Path, SDK } from "../sdk";
 import { reactive, watch } from "vue";
 import { groupProxy } from "@/store/group";
 import { isScenePlayRun, pauseScene, playScene } from "@/utils/full";
+import { analysisPose, setPose } from ".";
 
 // -----------------导览线关联--------------------
 export type PathNode = Path;
@@ -36,18 +37,21 @@ export const taggingsGroup = groupProxy(() => {
 
 export const playScenePath = (
   path: PathData,
-  forceFull = false
+  forceFull = false,
 ) => {
   const node = getPathNode(path)
   if (!node) return null;
 
+  let initPose: any;
   playScene({
     play: () => {
       return new Promise(resolve => {
+        initPose = analysisPose(sdk.getPose());
         node.play(resolve)
       })
     },
     pause: () => {
+      setPose(initPose)
       node.pause();
     }
   }, forceFull)

+ 1 - 0
src/sdk/sdk.ts

@@ -243,6 +243,7 @@ export type Path = {
     changePoints: PathProps['points']
     drawed: void
   }>;
+  changeDirection: ( show: boolean,  reverse: boolean ) => void
   changeFontSize: (fontSize: number) => void
   changeVisibilityRange: (range: number) => void
   changePointName: (index: number, name: string) => void

+ 2 - 1
src/views/guide/path/edit-path.vue

@@ -1,7 +1,7 @@
 <template>
   <Teleport to="#layout-app">
     <RightFillPano class="edit-path-point">
-      <div v-show="!~activePointNdx" :class="{ disable: !data.points.length }">
+      <div v-show="!~activePointNdx" :class="{ disabled: !data.points.length }">
         <ui-group
           :title="`${isTemploraryID(data.id) ? '创建' : '编辑'}路线`"
           borderBottom
@@ -176,6 +176,7 @@ import {
 } from "@/sdk/association/path";
 import { nextTick } from "process";
 import path from "path";
+import { sdk, analysisPose, setPose } from "@/sdk";
 
 const props = defineProps<{ data: Path }>();