bill 1 year ago
parent
commit
9ae6c43bb4
4 changed files with 1469 additions and 3 deletions
  1. 1462 0
      pnpm-lock.yaml
  2. 3 1
      src/model/app.vue
  3. 2 2
      src/sdk/cover/index.js
  4. 2 0
      src/views/guide/edit-paths.vue

File diff suppressed because it is too large
+ 1462 - 0
pnpm-lock.yaml


+ 3 - 1
src/model/app.vue

@@ -43,6 +43,8 @@ const typeChange = () => {
   return { typePromise, typeCleanup: stopWatch };
 };
 
+export const full = ref("scene");
+
 export const Model = defineComponent({
   name: "model",
   setup() {
@@ -213,7 +215,7 @@ export const Model = defineComponent({
       getShowScale,
       scaleInfo,
       iframeRef,
-      full: ref("scene"),
+      full,
       fuseRef,
       url,
     };

+ 2 - 2
src/sdk/cover/index.js

@@ -758,12 +758,12 @@ export const enter = (dom, mapDom, isLocal, lonlat) => {
                 changePosition(pos){//校准取消时执行
                     console.log('changePosition',pos.x, pos.y, pos.z)
                     model && model.position.copy(pos)
-                    model.dispatchEvent({type:'position_changed'}) 
+                    model && model.dispatchEvent({type:'position_changed'}) 
                 }, 
                 changeRotation(rot){//校准取消时执行 
                     console.log('changeRotation',rot.x, rot.y, rot.z)
                     model && model.rotation.setFromVector3(rot) 
-                    model.dispatchEvent({type:'rotation_changed'})  
+                    model && model.dispatchEvent({type:'rotation_changed'})  
                 },
                 
                 enterRotateMode(){

+ 2 - 0
src/views/guide/edit-paths.vue

@@ -101,6 +101,7 @@ import {
   showRightCtrlPanoStack,
   getResource,
 } from "@/env";
+import { full } from "@/model/app.vue";
 
 import type { Guide, GuidePaths, GuidePath } from "@/store";
 import type { CalcPathProps } from "@/sdk";
@@ -109,6 +110,7 @@ const props = defineProps<{ data: Guide }>();
 const paths = ref<GuidePaths>(getGuidePaths(props.data));
 const current = ref<GuidePath>(paths.value[0]);
 
+full.value = "scene";
 let init: () => void;
 recovery(props.data).then((fn) => (init = fn));
 onUnmounted(() => init());