|
@@ -1,3 +1,26 @@
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+//热点 设备控制
|
|
|
+
|
|
|
+$("#hotPannel .close").on('click',()=>{
|
|
|
+ $("#hotPannel>div").css("display","");
|
|
|
+ window.hotNeedUpdatePanel = null;
|
|
|
+
|
|
|
+})
|
|
|
+
|
|
|
+$("#hotPannel input.mui-switch").on('change',()=>{
|
|
|
+ var ifOn = $('#hotPannel input.mui-switch').is(':checked');
|
|
|
+
|
|
|
+})
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
var dom = {
|
|
|
getOffset: function(e, t, i) {
|
|
|
for (left = "left" == e ? t.offsetLeft : t.offsetTop,
|
|
@@ -14877,6 +14900,9 @@ function o(a, s, l) {
|
|
|
if(this.isSprite){
|
|
|
this.mesh.quaternion.copy(camera.quaternion)
|
|
|
}
|
|
|
+ if(window.hotNeedUpdatePannel == this){
|
|
|
+ this.updatePannel()
|
|
|
+ }
|
|
|
}
|
|
|
n.prototype.setVisiblePanos = function(visibleData){
|
|
|
if(visibleData == "get"){
|
|
@@ -14909,6 +14935,32 @@ function o(a, s, l) {
|
|
|
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ n.prototype.showPannel = function(){
|
|
|
+ var hardware = this.hardwareTemp || this.infoAttribute.hardware //hardwareTemp为编辑时绝对有的,如果是{}代表没有
|
|
|
+ if(hardware && hardware.id!=void 0){
|
|
|
+ $("#hotPannel>div").css("display","block");
|
|
|
+ $("#hotPannel .title").text(hardware.name);
|
|
|
+
|
|
|
+ this.updatePannel()
|
|
|
+ window.hotNeedUpdatePannel = this
|
|
|
+ }else{
|
|
|
+ $("#hotPannel>div").css("display","");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ n.prototype.updatePannel = function(){
|
|
|
+ var pos = math.getPos2d(this.position, player.camera, $("#player")[0])
|
|
|
+ $("#hotPannel>div").css( { "left" : `${pos.pos.x}px`, "top": `${pos.pos.y}px ` });
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
n.prototype.createTitleElem = function(title){
|
|
|
var root = $("#hot");
|
|
|
var elem = $(`<div> ${title}</div>`)
|
|
@@ -14981,66 +15033,72 @@ function o(a, s, l) {
|
|
|
|
|
|
n.prototype.examine = function(e, options) {
|
|
|
options = options || {}
|
|
|
- if(this.linkType!="common" && this.infoAttribute.iframe && this.infoAttribute.iframe[0] && !options.dontOpen){
|
|
|
- var src = getLink(this.infoAttribute.iframe[0]);
|
|
|
- if(this.linkType=="jumpLink"){
|
|
|
- var newPage = window.open(src, "_blank" );
|
|
|
- newPage.focus();
|
|
|
- }else if(this.linkType=="iframeDiv"){
|
|
|
-
|
|
|
- var div = document.createElement("div");
|
|
|
- $("body").append(div);
|
|
|
- div.style.position = 'fixed';
|
|
|
- div.style.width = div.style.height = "100%";
|
|
|
- div.style.left = div.style.top = '0';
|
|
|
- div.style["z-index"] = "999"
|
|
|
-
|
|
|
- var exit = document.createElement("div");
|
|
|
- exit.style["background-image"] = "url(images/vrOffImg.png)";
|
|
|
- exit.style.position = 'absolute';
|
|
|
- exit.style.width = exit.style.height = "50px";
|
|
|
- exit.style.left = '17px'; exit.style.top = "20px"
|
|
|
- exit.style.cursor = "pointer";
|
|
|
- exit.style["background-repeat"] = "no-repeat";
|
|
|
- exit.style["background-size"] = "25%";
|
|
|
- exit.style["background-position"] = "center center";
|
|
|
- exit.style["background-color"] = "rgba(0, 0, 0, 0.2)";
|
|
|
- exit.style["border-radius"] = "50%";
|
|
|
- exit.style["z-index"] = "3"
|
|
|
- exit.onclick = ()=>{
|
|
|
- $(div).remove()
|
|
|
- if(g_bgAudio && g_bgAudio.pauseByHot){
|
|
|
- manage.switchBgmState(true)
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- var myElement = document.createElement("iframe");
|
|
|
- myElement.style.position = 'absolute';
|
|
|
- myElement.style.width = myElement.style.height = "100%";
|
|
|
- myElement.style.left = myElement.style.top = '0';
|
|
|
-
|
|
|
- myElement.src = src
|
|
|
-
|
|
|
+ var hotPop = document.getElementById('popup');
|
|
|
+
|
|
|
+ if(window.MP_PREFETCHED_MODELDATA.flyInOnlyBySwitch){
|
|
|
+ this.showPannel();
|
|
|
+ if(player.mode != 'panorama' || !player.currentPano)return;
|
|
|
+ }else{
|
|
|
+ if(this.linkType!="common" && this.infoAttribute.iframe && this.infoAttribute.iframe[0] && !options.dontOpen){
|
|
|
+ var src = getLink(this.infoAttribute.iframe[0]);
|
|
|
+ if(this.linkType=="jumpLink"){
|
|
|
+ var newPage = window.open(src, "_blank" );
|
|
|
+ newPage.focus();
|
|
|
+ }else if(this.linkType=="iframeDiv"){
|
|
|
+
|
|
|
+ var div = document.createElement("div");
|
|
|
+ $("body").append(div);
|
|
|
+ div.style.position = 'fixed';
|
|
|
+ div.style.width = div.style.height = "100%";
|
|
|
+ div.style.left = div.style.top = '0';
|
|
|
+ div.style["z-index"] = "999"
|
|
|
+
|
|
|
+ var exit = document.createElement("div");
|
|
|
+ exit.style["background-image"] = "url(images/vrOffImg.png)";
|
|
|
+ exit.style.position = 'absolute';
|
|
|
+ exit.style.width = exit.style.height = "50px";
|
|
|
+ exit.style.left = '17px'; exit.style.top = "20px"
|
|
|
+ exit.style.cursor = "pointer";
|
|
|
+ exit.style["background-repeat"] = "no-repeat";
|
|
|
+ exit.style["background-size"] = "25%";
|
|
|
+ exit.style["background-position"] = "center center";
|
|
|
+ exit.style["background-color"] = "rgba(0, 0, 0, 0.2)";
|
|
|
+ exit.style["border-radius"] = "50%";
|
|
|
+ exit.style["z-index"] = "3"
|
|
|
+ exit.onclick = ()=>{
|
|
|
+ $(div).remove()
|
|
|
+ if(g_bgAudio && g_bgAudio.pauseByHot){
|
|
|
+ manage.switchBgmState(true)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ var myElement = document.createElement("iframe");
|
|
|
+ myElement.style.position = 'absolute';
|
|
|
+ myElement.style.width = myElement.style.height = "100%";
|
|
|
+ myElement.style.left = myElement.style.top = '0';
|
|
|
+
|
|
|
+ myElement.src = src
|
|
|
+
|
|
|
+
|
|
|
+ div.appendChild(exit);
|
|
|
+ div.appendChild(myElement)
|
|
|
+
|
|
|
+
|
|
|
+ if(g_bgAudio && !g_bgAudio.paused){
|
|
|
+ manage.switchBgmState(false);
|
|
|
+ g_bgAudio.pauseByHot = true
|
|
|
+ }
|
|
|
+ if(g_tourAudio)g_tourAudio.pause()
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
- div.appendChild(exit);
|
|
|
- div.appendChild(myElement)
|
|
|
|
|
|
|
|
|
- if(g_bgAudio && !g_bgAudio.paused){
|
|
|
- manage.switchBgmState(false);
|
|
|
- g_bgAudio.pauseByHot = true
|
|
|
- }
|
|
|
- if(g_tourAudio)g_tourAudio.pause()
|
|
|
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- return;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
|
|
|
|
|
|
if(!player.currentPano)return;
|