xzw 4 months ago
parent
commit
8745b31829
1 changed files with 2 additions and 3 deletions
  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(typeof toPano == 'number')toPano = this.panos[toPano]
         if(toPano instanceof Panorama){
         if(toPano instanceof Panorama){
             toPano = {pano: toPano}
             toPano = {pano: toPano}
         }
         }
-         
+        if(!toPano?.pano )return toPano?.deferred?.resolve(false)
         
         
         let done = (makeIt, disturb)=>{
         let done = (makeIt, disturb)=>{
             //console.log('flyToPano done ', toPano.pano.id, makeIt, disturb ) 
             //console.log('flyToPano done ', toPano.pano.id, makeIt, disturb )