|
|
@@ -1243,11 +1243,7 @@ Hotpoint.prototype.init = function() {
|
|
|
})
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
|
|
|
this.isSpriteCheckBox = new CheckBox({dom: $("#isSprite"),
|
|
|
uiCallBack : (checked)=>{
|
|
|
@@ -1279,6 +1275,25 @@ Hotpoint.prototype.init = function() {
|
|
|
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
+
|
|
|
+ this.autoOpenCheckBox = new CheckBox({dom: $('#autoOpen input') ,
|
|
|
+ uiCallBack : (checked, name)=>{
|
|
|
+ let label = $('#hotpointDetail [name=autoOpen] [name=panoId]')
|
|
|
+ checked ? label.removeClass('hide') : label.addClass('hide')
|
|
|
+ $('#autoOpen span').text(checked ? '自动打开' : '在当前点位自动打开')
|
|
|
+ setTimeout(()=>{
|
|
|
+ checked && label.find('span').text(this.editSpot.info.autoOpenPanoId )
|
|
|
+ },1)
|
|
|
+ },
|
|
|
+ callbackWhenChose:(checked, name)=>{
|
|
|
+ this.editSpot.info.autoOpenPanoId = checked ? player.currentPano.id : null
|
|
|
+ $('#autoOpen span').text(checked ? '自动打开' : '在当前点位自动打开')
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
this.imgDescCheckBox = new CheckBox({dom: this.hotpointDetail.find("#addImgDesc"),
|
|
|
uiCallBack : (checked, name)=>{
|
|
|
@@ -1446,6 +1461,12 @@ Hotpoint.prototype.init = function() {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/* $('#setPosForPano input').on("change", ()=>{
|
|
|
var on = $('#setPosForPano input').is(':checked')
|
|
|
if(!on){
|
|
|
@@ -1879,11 +1900,14 @@ Hotpoint.prototype.editHot = function(hot, $li) {
|
|
|
this.videoDescCheckBox.updateChoseAtUI(this.editSpot.info.useVideoDesc)
|
|
|
|
|
|
this.linkTypeMenuOptions.updateChoseAtUI({name:this.editSpot.info.linkType})
|
|
|
-
|
|
|
+ this.autoOpenCheckBox.updateChoseAtUI(this.editSpot.info.autoOpenPanoId == void 0 ? false : true)
|
|
|
|
|
|
this.updateClickEventUI();//根据actionType更新ui
|
|
|
|
|
|
-
|
|
|
+ $('#hotpointDetail li[name=autoOpen] img[name=btn]').on('click',(e)=>{//定位
|
|
|
+ let pano = player.model.panos.index[this.editSpot.info.autoOpenPanoId]
|
|
|
+ player.flyToPano({pano})
|
|
|
+ })
|
|
|
|
|
|
var iframesHTML = hot.info.iframe.map(function(iframe) {
|
|
|
return this.inputList("请填写网页链接", iframe)
|
|
|
@@ -2107,10 +2131,12 @@ Hotpoint.prototype.findSpotByContent = (media, type)=>{////使用了该贴图的
|
|
|
var spots = []
|
|
|
|
|
|
if(type == 'shine'){
|
|
|
- media = media || []
|
|
|
+ media = media || []
|
|
|
+
|
|
|
for(var i in player.model.hots){
|
|
|
if(player.model.hots[i].texType != type)continue
|
|
|
- var styleImg = player.model.hots[i].styleImg || [];
|
|
|
+ var styleImg = player.model.hots[i].styleImg?.length ? player.model.hots[i].styleImg : Object.values(g_HotImage).map(e=>{return {src:e}});
|
|
|
+
|
|
|
if(ifSameTex(styleImg, media)){
|
|
|
spots.push(player.model.hots[i])
|
|
|
}
|
|
|
@@ -2166,7 +2192,7 @@ Hotpoint.prototype.initListSelect = function(){//热点样式图列表
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- var hotIcons = []; // 从所有热点tex中搜集 。
|
|
|
+ var hotIcons = [ Object.values(g_HotImage)]; // 从所有热点tex中搜集 。 g_HotImage是默认
|
|
|
player.model.hotGroup.children.forEach(e=>{// 从所有热点tex中搜集
|
|
|
if(e.texType == 'shine'){
|
|
|
let imgs = e.info.styleImg;
|
|
|
@@ -2177,10 +2203,9 @@ Hotpoint.prototype.initListSelect = function(){//热点样式图列表
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
- hotIcons = hotIcons.map(imgs=>imgs = imgs.map((a)=>{return {src:a}}))
|
|
|
- //hotIcons = [[], [g_HotImage.point, g_HotImage.point2], ...hotIcons]
|
|
|
- hotIcons.push([{src:g_HotImage.point}, {src:g_HotImage.point2}],[] )//放末尾用来添加的 g_HotImage是默认
|
|
|
+ hotIcons = [...hotIcons.slice(1), hotIcons[0]]//默认的放最后, 这样添加完在列表最前
|
|
|
+ hotIcons = hotIcons.map(imgs=>imgs = imgs.map((a)=>{return {src:a}}))
|
|
|
+ hotIcons.push( [] )//放末尾用来添加的
|
|
|
|
|
|
var list = hotIcons.map(arr=>{//初始列表
|
|
|
var elem = getListItem()
|
|
|
@@ -2192,7 +2217,7 @@ Hotpoint.prototype.initListSelect = function(){//热点样式图列表
|
|
|
arr.length && elem.find("li").eq(1).removeClass('hide')
|
|
|
return elem
|
|
|
})
|
|
|
- list[list.length - 2].addClass('forbitEdit')
|
|
|
+ list[0].addClass('forbitEdit') //list[list.length - 2].addClass('forbitEdit')
|
|
|
|
|
|
|
|
|
this.styleList = new ListBox(list, $('#shineTexSelect'), {//列表
|
|
|
@@ -2220,7 +2245,8 @@ Hotpoint.prototype.initListSelect = function(){//热点样式图列表
|
|
|
o.dontApplyToHot || this.editSpot.changeShineTex(imgs)
|
|
|
}
|
|
|
|
|
|
- Array.from(this.styleList.listDom.children()).forEach(li=>{//更新一下所有的li的使用的spot
|
|
|
+ Array.from(this.styleList.listDom.children()).forEach((li,index)=>{//更新一下所有的li的使用的spot
|
|
|
+ if(index == 0)return //第一个是upload
|
|
|
li.sameContentSpots = this.findSpotByContent(li._styleImg, 'shine')
|
|
|
})
|
|
|
|
|
|
@@ -2272,6 +2298,7 @@ Hotpoint.prototype.initListSelect = function(){//热点样式图列表
|
|
|
$li.bind('mouseover', (e)=>{
|
|
|
/* this.showTitileSpots = $li[0].sameContentSpots;
|
|
|
this.showTitileSpots.forEach(a=>a.showTitle()) */
|
|
|
+ if($li.index() == 0)return
|
|
|
countElem.text("热点个数:"+$li[0].sameContentSpots.length).removeClass('hide')
|
|
|
$li.append(countElem)
|
|
|
$li[0].sameContentSpots.forEach(hot=>{
|
|
|
@@ -3930,6 +3957,11 @@ Hotpoint.prototype.getSavingInfo = function(){//保存全部
|
|
|
var sid = $(li).attr("data-spid");
|
|
|
var hot = player.model.hots[sid]
|
|
|
var hotData = CloneObject(hot.info)
|
|
|
+
|
|
|
+ for(let i in hotData){
|
|
|
+ if(hotData[i] == void 0 )delete hotData[i]
|
|
|
+ }
|
|
|
+
|
|
|
if(hotData.texSrc){
|
|
|
hotData.texSrc = manage.removeSrcPostMark(hotData.texSrc)
|
|
|
}
|