Sfoglia il codice sorgente

云展览)切换区域时点击自动观展,页面崩溃

xzw 3 anni fa
parent
commit
1df2abab7a
1 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  1. 5 2
      public/static/js/main_2020_show.js

+ 5 - 2
public/static/js/main_2020_show.js

@@ -7270,7 +7270,8 @@ window.Modernizr = function(n, e, t) {
                     })
                 }),
                 window.startAndPlay = function(e) {
-                    // l(e); 
+                    // l(e);  
+                   //if(player.flying))return;
                    Ze("tour");
                    ve.play();
                    J.trackAlways("showcase_gui", {
@@ -23996,6 +23997,7 @@ window.Modernizr = function(n, e, t) {
             n.prototype.blackToPano = function(o={}) {//add 瞬间过渡
                 //o.panoId = "8bc9156b288d48459e4e0f74d7051ef1"
                 
+                if(this.flying || this.isWarping() )return;
                 
                 let oldPos = this.position.clone();
                 let oldPano = this.currentPano
@@ -24012,7 +24014,7 @@ window.Modernizr = function(n, e, t) {
                     return void (this.waitingToWarp = !0)
                  
                 this.emit("pano.chosen", oldPano, pano),
-
+                this.flying = true
  
                 this.path.warpDestHeroLoc = {  
                     panoId : o.panoId,
@@ -24027,6 +24029,7 @@ window.Modernizr = function(n, e, t) {
                     pano.enter() 
                     this.currentPano = pano
                     this.emit("flying.ended", pano.position, oldPos, pano, oldPano)
+                    this.flying = false
                 } )
                 
             }