xzw 6 月之前
父节点
当前提交
8745b31829
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      src/custom/modules/panos/Images360.js

+ 2 - 3
src/custom/modules/panos/Images360.js

@@ -908,13 +908,12 @@ export class Images360 extends THREE.EventDispatcher{
     }
 
 
-    flyToPano(toPano) {  //飞向漫游点
-        if(!toPano)return
+    flyToPano(toPano={}) {  //飞向漫游点 
         if(typeof toPano == 'number')toPano = this.panos[toPano]
         if(toPano instanceof Panorama){
             toPano = {pano: toPano}
         }
-         
+        if(!toPano?.pano )return toPano?.deferred?.resolve(false)
         
         let done = (makeIt, disturb)=>{
             //console.log('flyToPano done ', toPano.pano.id, makeIt, disturb )