|
@@ -4539,14 +4539,15 @@ window.Modernizr = function(n, e, t) {
|
|
if(!this.panoIdMap) {
|
|
if(!this.panoIdMap) {
|
|
this.panoIdMap = new Map()
|
|
this.panoIdMap = new Map()
|
|
this.model.heroLocations.forEach( (value, index) => {
|
|
this.model.heroLocations.forEach( (value, index) => {
|
|
- value.heroLocations.forEach( hl => {
|
|
|
|
|
|
+ // value.heroLocations.forEach( hl => {
|
|
|
|
+ let hl = value.heroLocations[0]
|
|
let arr = this.panoIdMap.get(hl.panoId)
|
|
let arr = this.panoIdMap.get(hl.panoId)
|
|
if(arr){
|
|
if(arr){
|
|
this.panoIdMap.set(hl.panoId, [...arr, index])
|
|
this.panoIdMap.set(hl.panoId, [...arr, index])
|
|
} else {
|
|
} else {
|
|
this.panoIdMap.set(hl.panoId, [index])
|
|
this.panoIdMap.set(hl.panoId, [index])
|
|
}
|
|
}
|
|
- })
|
|
|
|
|
|
+ // })
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -4818,7 +4819,7 @@ window.Modernizr = function(n, e, t) {
|
|
let audioSrc2 = common.getFileNameFromUrl(src)
|
|
let audioSrc2 = common.getFileNameFromUrl(src)
|
|
|
|
|
|
if(audioSrc1 == audioSrc2){//应该是继续播放该folder
|
|
if(audioSrc1 == audioSrc2){//应该是继续播放该folder
|
|
- if(this.destinationItem[1] == 0){//从头开始播放 因为可能暂停后然后再点该缩略图播 // 周恩光改 开头为1
|
|
|
|
|
|
+ if(this.destinationItem[1] == 0){//从头开始播放 因为可能暂停后然后再点该缩略图播
|
|
SoundManager.play('tour',null,0) // currentTime = 0;
|
|
SoundManager.play('tour',null,0) // currentTime = 0;
|
|
}else if( audioObj.audio.paused && audioObj.audio.currentTime < audioObj.audio.duration ){//未播完
|
|
}else if( audioObj.audio.paused && audioObj.audio.currentTime < audioObj.audio.duration ){//未播完
|
|
SoundManager.play('tour')//继续播。为什么会有暂停的情况?如果手动切换到bgm了呢?
|
|
SoundManager.play('tour')//继续播。为什么会有暂停的情况?如果手动切换到bgm了呢?
|
|
@@ -4913,6 +4914,7 @@ window.Modernizr = function(n, e, t) {
|
|
n.prototype.playTour = function() {
|
|
n.prototype.playTour = function() {
|
|
if (!this.bounceable()) {
|
|
if (!this.bounceable()) {
|
|
|
|
|
|
|
|
+ if(!this.currentItem) this.currentItem = []
|
|
if(this.currentItem[0] != 0 || this.destinationItem[0]!= this.nItems-1){
|
|
if(this.currentItem[0] != 0 || this.destinationItem[0]!= this.nItems-1){
|
|
// 周恩光加 从当前pano进行自动导览
|
|
// 周恩光加 从当前pano进行自动导览
|
|
let currentPanoDestinations = this.panoIdMap.get(this.player.currentPano.id)
|
|
let currentPanoDestinations = this.panoIdMap.get(this.player.currentPano.id)
|
|
@@ -5089,7 +5091,7 @@ window.Modernizr = function(n, e, t) {
|
|
var currentChildNum = currentLocation.heroLocations ? currentLocation.heroLocations.length : 1
|
|
var currentChildNum = currentLocation.heroLocations ? currentLocation.heroLocations.length : 1
|
|
var item;
|
|
var item;
|
|
if(this.currentItem[1] >= currentChildNum - 1){//子目录中最后一个
|
|
if(this.currentItem[1] >= currentChildNum - 1){//子目录中最后一个
|
|
- item = [currentItem[0] + 1, 0] //结果可能超出nItems // 周恩光 导览片段从1开始
|
|
|
|
|
|
+ item = [currentItem[0] + 1, 0] //结果可能超出nItems
|
|
}else{
|
|
}else{
|
|
item = [currentItem[0] , currentItem[1]+1]
|
|
item = [currentItem[0] , currentItem[1]+1]
|
|
}
|
|
}
|
|
@@ -5125,7 +5127,7 @@ window.Modernizr = function(n, e, t) {
|
|
|
|
|
|
A.debug("tourAdvance(" + e + ")")
|
|
A.debug("tourAdvance(" + e + ")")
|
|
|
|
|
|
- // 周恩光改 导览片段应该从1开始,而不是0
|
|
|
|
|
|
+ // 周恩光改
|
|
if(null === this.currentItem || void 0 === this.currentItem){
|
|
if(null === this.currentItem || void 0 === this.currentItem){
|
|
// this.setDestinationItem(this.firstDestination())
|
|
// this.setDestinationItem(this.firstDestination())
|
|
// this.setDestinationItem([currentPanoDestinations[0], 0])
|
|
// this.setDestinationItem([currentPanoDestinations[0], 0])
|