瀏覽代碼

Merge branch 'master' of http://192.168.0.115:3000/chenzhiguang/301hospital

tremble 3 年之前
父節點
當前提交
9ab6c7589d
共有 1 個文件被更改,包括 9 次插入2 次删除
  1. 9 2
      web/public/static/js/main_2020_show.js

+ 9 - 2
web/public/static/js/main_2020_show.js

@@ -4831,6 +4831,9 @@ window.Modernizr = function(n, e, t) {
                     
                      
                 }
+
+                let oldPos = this.player.position.clone();
+                let oldPano = this.player.currentPano
                 
                 if (this.onTheBus = !0,
                 this.emit("update.controls"),
@@ -4877,6 +4880,8 @@ window.Modernizr = function(n, e, t) {
                     }
                     .bind(this), o),
                     this.emit("update.controls") 
+                    let pano = this.model.panos.index[r.panoId]
+                    this.player.emit("flying.ended", pano.position, oldPos, pano, oldPano) 
                 }
             }
             ,
@@ -5092,7 +5097,8 @@ window.Modernizr = function(n, e, t) {
                 // })
 
                 if(!currentPanoDestinations) { 
-                    let panoIndex = this.model.panos.list.findIndex( pano => pano.id == this.player.currentPano.id )
+                    // let panoIndex = this.model.panos.list.findIndex( pano => pano.id == this.player.currentPano.id )
+                    let panoIndex = this.model.panos.list.indexOf( this.player.currentPano )
                     let neighbourIndex = [ panoIndex + 1, panoIndex - 1, panoIndex + 2, panoIndex - 2 ]
                     for(var i = 0; i < neighbourIndex.length; i++) {
                         currentPanoDestinations = this.panoIdMap.get(this.model.panos.list[neighbourIndex[i]].id)
@@ -22697,7 +22703,8 @@ window.Modernizr = function(n, e, t) {
                 for (var index in hots){
                     var visible; 
                     if(this.mode != "panorama"){
-                        visible = true;
+                        // visible = true;
+                        visible = false;    // 周恩光改 非全景模式下隐藏热点
                     }else{ 
                         //hots[index].mesh.material.depthTest = false;  
                         visible = !hots[index].visiblePanos || hots[index].visiblePanos.indexOf(pano.id) > -1