// Garden Gnome Software - Skin // Pano2VR 6.1.2/17873 // Filename: tarma-2.ggsk // Generated 2020-03-23T19:32:15 function pano2vrSkin(player,base) { player.addVariable('var1', 1, 0); player.addVariable('opt_3d_preview', 2, true); var me=this; var skin=this; var flag=false; var hotspotTemplates={}; var skinKeyPressed = 0; this.player=player; this.player.skinObj=this; this.divSkin=player.divSkin; this.ggUserdata=player.userdata; this.lastSize={ w: -1,h: -1 }; var basePath=""; // auto detect base path if (base=='?') { var scripts = document.getElementsByTagName('script'); for(var i=0;i=0) { var p=src.lastIndexOf('/'); if (p>=0) { basePath=src.substr(0,p+1); } } } } else if (base) { basePath=base; } this.elementMouseDown=[]; this.elementMouseOver=[]; var cssPrefix=''; var domTransition='transition'; var domTransform='transform'; var prefixes='Webkit,Moz,O,ms,Ms'.split(','); var i; var hs,el,els,elo,ela,elHorScrollFg,elHorScrollBg,elVertScrollFg,elVertScrollBg,elCornerBg; if (typeof document.body.style['transform'] == 'undefined') { for(var i=0;i0) { var e=stack.pop(); if (e.ggUpdatePosition) { e.ggUpdatePosition(); } if (e.hasChildNodes()) { for(var i=0;i0) { var e=stack.pop(); if (e.ggNodeChange) { e.ggNodeChange(); } if (e.hasChildNodes()) { for(var i=0;i0) { var e=stack.pop(); if (regex) { if (pat.test(e.ggId)) r.push(e); } else { if (e.ggId==id) r.push(e); } if (e.hasChildNodes()) { for(var i=0;i0||!me._chevron_white.style.opacity)?'inherit':'hidden'; me._chevron_white.ggVisible=true; } } } me._chevron_white.logicBlock_alpha = function() { var newLogicStateAlpha; if ( ((me.elementMouseOver['ht_node'] == true)) ) { newLogicStateAlpha = 0; } else { newLogicStateAlpha = -1; } if (me._chevron_white.ggCurrentLogicStateAlpha != newLogicStateAlpha) { me._chevron_white.ggCurrentLogicStateAlpha = newLogicStateAlpha; me._chevron_white.style[domTransition]='opacity 500ms ease 0ms'; if (me._chevron_white.ggCurrentLogicStateAlpha == 0) { me._chevron_white.style.visibility=me._chevron_white.ggVisible?'inherit':'hidden'; me._chevron_white.style.opacity=1; } else { me._chevron_white.style.visibility=me._chevron_white.ggVisible?'inherit':'hidden'; me._chevron_white.style.opacity=1; } } } me._chevron_white.ggUpdatePosition=function (useTransition) { if (useTransition==='undefined') { useTransition = false; } if (!useTransition) { this.style[domTransition]='none'; } if (this.parentNode) { var pw=this.parentNode.clientWidth; var w=this.offsetWidth; this.style.left=(this.ggDx + pw/2 - w/2) + 'px'; var ph=this.parentNode.clientHeight; var h=this.offsetHeight; this.style.top=(this.ggDy + ph/2 - h/2) + 'px'; } } me._ht_node.appendChild(me._chevron_white); el=me._hs_preview_image=document.createElement('div'); els=me._hs_preview_image__img=document.createElement('img'); els.className='ggskin ggskin_nodeimage'; els.setAttribute('src',basePath + "images/hs_preview_image_" + nodeId + ".jpg"); el.ggNodeId=nodeId; els.setAttribute('style','position: absolute;top: 0px;left: 0px;width: 100%;height: 100%;-webkit-user-drag:none;pointer-events:none;;'); els.className='ggskin ggskin_nodeimage'; els['ondragstart']=function() { return false; }; el.appendChild(els); el.ggSubElement = els; el.ggId="hs_preview_image"; el.ggDx=0; el.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; el.ggVisible=true; el.className="ggskin ggskin_nodeimage "; el.ggType='nodeimage'; hs =''; hs+='z-index: -5;'; hs+='height : 90px;'; hs+='left : -10000px;'; hs+='opacity : 0;'; hs+='position : absolute;'; hs+='top : -220px;'; hs+='visibility : hidden;'; hs+='width : 140px;'; hs+='pointer-events:none;'; hs+='border-radius: 5px; overflow: hidden; box-shadow: 0px 0px 2px #000000; transform:translate3d(0px,0px,90px) rotateX(-90deg) scale(1.5); transform-style: preserve-3d; -webkit-backface-visibility: hidden; backface-visibility: hidden;'; el.setAttribute('style',hs); el.style[domTransform + 'Origin']='50% 50%'; me._hs_preview_image.ggIsActive=function() { return player.getCurrentNode()==this.ggElementNodeId(); } el.ggElementNodeId=function() { return this.ggNodeId; } me._hs_preview_image.logicBlock_alpha = function() { var newLogicStateAlpha; if ( ((me.elementMouseOver['ht_node'] == true)) && ((player.getVariableValue('opt_3d_preview') == true)) && ((player.getIsTour() == true)) ) { newLogicStateAlpha = 0; } else { newLogicStateAlpha = -1; } if (me._hs_preview_image.ggCurrentLogicStateAlpha != newLogicStateAlpha) { me._hs_preview_image.ggCurrentLogicStateAlpha = newLogicStateAlpha; me._hs_preview_image.style[domTransition]='opacity 500ms ease 0ms'; if (me._hs_preview_image.ggCurrentLogicStateAlpha == 0) { me._hs_preview_image.style.visibility=me._hs_preview_image.ggVisible?'inherit':'hidden'; me._hs_preview_image.style.opacity=1; } else { setTimeout(function() { if (me._hs_preview_image.style.opacity == 0.0) { me._hs_preview_image.style.visibility="hidden"; } }, 505); me._hs_preview_image.style.opacity=0; } } } me._hs_preview_image.ggUpdatePosition=function (useTransition) { if (useTransition==='undefined') { useTransition = false; } if (!useTransition) { this.style[domTransition]='none'; } if (this.parentNode) { var pw=this.parentNode.clientWidth; var w=this.offsetWidth; this.style.left=(this.ggDx + pw/2 - w/2) + 'px'; } } el=me._hs_tt=document.createElement('div'); els=me._hs_tt__text=document.createElement('div'); el.className='ggskin ggskin_textdiv'; el.ggTextDiv=els; el.ggId="hs_tt"; el.ggDx=0; el.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; el.ggVisible=true; el.className="ggskin ggskin_text "; el.ggType='text'; hs =''; hs+='bottom : 0px;'; hs+='height : 20px;'; hs+='left : -10000px;'; hs+='position : absolute;'; hs+='visibility : inherit;'; hs+='width : 140px;'; hs+='pointer-events:none;'; el.setAttribute('style',hs); el.style[domTransform + 'Origin']='50% 100%'; hs ='position:absolute;'; hs += 'box-sizing: border-box;'; hs+='cursor: default;'; hs+='left: 0px;'; hs+='bottom: 0px;'; hs+='width: 140px;'; hs+='height: auto;'; hs+='pointer-events: none;'; hs+='background: #000000;'; hs+='background: rgba(0,0,0,0.196078);'; hs+='border: 0px solid #000000;'; hs+='color: rgba(255,255,255,1);'; hs+='font-size: 12px;'; hs+='font-weight: inherit;'; hs+='text-align: center;'; hs+='white-space: pre-wrap;'; hs+='padding: 2px 3px 2px 3px;'; hs+='overflow: hidden;'; els.setAttribute('style',hs); els.innerHTML=me.hotspot.title; el.appendChild(els); me._hs_tt.ggIsActive=function() { if ((this.parentNode) && (this.parentNode.ggIsActive)) { return this.parentNode.ggIsActive(); } return false; } el.ggElementNodeId=function() { if ((this.parentNode) && (this.parentNode.ggElementNodeId)) { return this.parentNode.ggElementNodeId(); } return me.ggNodeId; } me._hs_tt.logicBlock_visible = function() { var newLogicStateVisible; if ( ((player.getVariableValue('opt_3d_tooltip') == false)) || ((me.hotspot.title == "")) ) { newLogicStateVisible = 0; } else { newLogicStateVisible = -1; } if (me._hs_tt.ggCurrentLogicStateVisible != newLogicStateVisible) { me._hs_tt.ggCurrentLogicStateVisible = newLogicStateVisible; me._hs_tt.style[domTransition]=''; if (me._hs_tt.ggCurrentLogicStateVisible == 0) { me._hs_tt.style.visibility="hidden"; me._hs_tt.ggVisible=false; } else { me._hs_tt.style.visibility=(Number(me._hs_tt.style.opacity)>0||!me._hs_tt.style.opacity)?'inherit':'hidden'; me._hs_tt.ggVisible=true; } } } me._hs_tt.ggUpdatePosition=function (useTransition) { if (useTransition==='undefined') { useTransition = false; } if (!useTransition) { this.style[domTransition]='none'; } if (this.parentNode) { var pw=this.parentNode.clientWidth; var w=this.offsetWidth + 0; this.style.left=(this.ggDx + pw/2 - w/2) + 'px'; } } me._hs_preview_image.appendChild(me._hs_tt); el=me._hs_visited=document.createElement('div'); els=me._hs_visited__img=document.createElement('img'); els.className='ggskin ggskin_svg'; hs='data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0ndXRmLTgnPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgLTI0MCAzMzIgMTMwIDEzMDsiIGlkPSJMYXllcl8xIiB5PSIwcHgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHZlcnNpb249IjEuMSIgdmlld0JveD0iLTI0MCAzMzIgMTMwIDEzMCIgeG1sOnNwYWNlPS'+ 'JwcmVzZXJ2ZSIgeD0iMHB4Ij4KIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+JiN4ZDsKCS5zdDB7ZmlsbDojMDAwMDAwO30mI3hkOwoJLnN0MXtmaWxsOiNGRkZGRkY7fSYjeGQ7Cjwvc3R5bGU+CiA8ZyBpZD0iTGF5ZXJfMV8xXyIvPgogPGcgaWQ9IkxheWVyXzIiPgogIDxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0tMTIyLjEsMzQxLjVoLTEwNS44Yy0xLjQsMC0yLjYsMS4xLTIuNiwyLjZ2MTA1LjhjMCwxLjQsMS4xLDIuNiwyLjYsMi42aDEwNS44YzEuNCwwLDIuNi0xLjEsMi42LTIuNlYzNDQuMSYjeGQ7JiN4YTsmI3g5OyYjeDk7Qy0xMTkuNiwzNDIuNy0xMjAuNywzNDEuNS0xMjIuMSwzNDEuNXog'+ 'TS0xMzIuOCwzODEuN2wtNTAuOCw1MC44Yy0wLjMsMC4zLTAuOCwwLjUtMS4yLDAuNWMtMC41LDAtMC45LTAuMS0xLjMtMC41bC0zMS43LTMxLjgmI3hkOyYjeGE7JiN4OTsmI3g5O2MtMC43LTAuNy0wLjctMS43LDAtMi40bDEyLjUtMTIuNWMwLjctMC43LDEuNy0wLjcsMi40LDBsMTgsMThsMzcuMS0zNy4xYzAuNy0wLjcsMS43LTAuNywyLjQsMGwxMi41LDEyLjUmI3hkOyYjeGE7JiN4OTsmI3g5O0MtMTMyLjEsMzc5LjktMTMyLjEsMzgxLTEzMi44LDM4MS43eiIvPgogIDxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0tMTQ3LjcsMzY2LjhsLTM3LjEsMzcuMWwtMTgtMThjLTAuNy0wLjctMS43LTAuNy'+ '0yLjQsMGwtMTIuNSwxMi41Yy0wLjcsMC43LTAuNywxLjcsMCwyLjRsMzEuNywzMS44JiN4ZDsmI3hhOyYjeDk7JiN4OTtjMC4zLDAuMywwLjgsMC41LDEuMywwLjVjMC40LDAsMC45LTAuMiwxLjItMC41bDUwLjgtNTAuOWMwLjctMC43LDAuNy0xLjcsMC0yLjRsLTEyLjUtMTIuNUMtMTQ1LjksMzY2LjEtMTQ3LDM2Ni4xLTE0Ny43LDM2Ni44eiIvPgogPC9nPgo8L3N2Zz4K'; me._hs_visited__img.setAttribute('src',hs); els.setAttribute('style','position: absolute;top: 0px;left: 0px;width: 100%;height: 100%;-webkit-user-drag:none;pointer-events:none;;'); els['ondragstart']=function() { return false; }; el.appendChild(els); el.ggSubElement = els; el.ggId="hs_visited"; el.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; el.ggVisible=false; el.className="ggskin ggskin_svg "; el.ggType='svg'; hs =''; hs+='height : 20px;'; hs+='position : absolute;'; hs+='right : 5px;'; hs+='top : 5px;'; hs+='visibility : hidden;'; hs+='width : 20px;'; hs+='pointer-events:none;'; el.setAttribute('style',hs); el.style[domTransform + 'Origin']='50% 50%'; me._hs_visited.ggIsActive=function() { if ((this.parentNode) && (this.parentNode.ggIsActive)) { return this.parentNode.ggIsActive(); } return false; } el.ggElementNodeId=function() { if ((this.parentNode) && (this.parentNode.ggElementNodeId)) { return this.parentNode.ggElementNodeId(); } return me.ggNodeId; } me._hs_visited.logicBlock_visible = function() { var newLogicStateVisible; if ( ((me._hs_visited.ggIsActive() == true)) || ((player.nodeVisited(me._hs_visited.ggElementNodeId()) == true)) ) { newLogicStateVisible = 0; } else { newLogicStateVisible = -1; } if (me._hs_visited.ggCurrentLogicStateVisible != newLogicStateVisible) { me._hs_visited.ggCurrentLogicStateVisible = newLogicStateVisible; me._hs_visited.style[domTransition]=''; if (me._hs_visited.ggCurrentLogicStateVisible == 0) { me._hs_visited.style.visibility=(Number(me._hs_visited.style.opacity)>0||!me._hs_visited.style.opacity)?'inherit':'hidden'; me._hs_visited.ggVisible=true; } else { me._hs_visited.style.visibility="hidden"; me._hs_visited.ggVisible=false; } } } me._hs_visited.ggUpdatePosition=function (useTransition) { } me._hs_preview_image.appendChild(me._hs_visited); me._ht_node.appendChild(me._hs_preview_image); el=me.__code=document.createElement('div'); els=me.__code__text=document.createElement('div'); el.className='ggskin ggskin_textdiv'; el.ggTextDiv=els; el.ggId="_code"; el.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; el.ggVisible=false; el.className="ggskin ggskin_text "; el.ggType='text'; hs =''; hs+='height : 37px;'; hs+='left : 0px;'; hs+='position : absolute;'; hs+='top : -39px;'; hs+='visibility : hidden;'; hs+='width : 66px;'; hs+='pointer-events:none;'; el.setAttribute('style',hs); el.style[domTransform + 'Origin']='50% 50%'; hs ='position:absolute;'; hs += 'box-sizing: border-box;'; hs+='cursor: default;'; hs+='left: 0px;'; hs+='top: 0px;'; hs+='width: 68px;'; hs+='height: 39px;'; hs+='pointer-events: none;'; hs+='background: #ffffff;'; hs+='border: 1px solid #000000;'; hs+='color: #000000;'; hs+='text-align: left;'; hs+='white-space: nowrap;'; hs+='padding: 0px 1px 0px 1px;'; hs+='overflow: hidden;'; els.setAttribute('style',hs); els.innerHTML=""; this.onUpdatePosition=function(player,hotspot) { var vs=player.getViewerSize(); var y=vs.height * (1/6*(1+Math.cos(player.getTilt() * Math.PI/90.0))); var hs= 'perspective(500px) translate3d(0px,' + (y) + 'px,0px) '; hs += 'rotateZ(' + ( player.getRoll()).toFixed(10) + 'deg) '; hs += 'rotateX(' + ( player.getTilt()).toFixed(10) + 'deg) '; hs += 'rotateY(' + (-player.getPan()).toFixed(10) + 'deg) '; hs += 'rotateY(' + ( hotspot.pan).toFixed(2) + 'deg) '; hs += 'rotateX(' + (-hotspot.tilt).toFixed(2) + 'deg) '; hs += 'rotateX(90deg) '; this.__div.style.transform=hs; this.__div.style.left = vs.width / 2 + "px"; this.__div.style.top = vs.height / 2 + "px"; }; el.appendChild(els); me.__code.ggIsActive=function() { if ((this.parentNode) && (this.parentNode.ggIsActive)) { return this.parentNode.ggIsActive(); } return false; } el.ggElementNodeId=function() { if ((this.parentNode) && (this.parentNode.ggElementNodeId)) { return this.parentNode.ggElementNodeId(); } return me.ggNodeId; } me.__code.ggUpdatePosition=function (useTransition) { } me._ht_node.appendChild(me.__code); el=me._tt_ht_3d=document.createElement('div'); els=me._tt_ht_3d__text=document.createElement('div'); el.className='ggskin ggskin_textdiv'; el.ggTextDiv=els; el.ggId="tt_ht_3d"; el.ggDx=0; el.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; el.ggVisible=false; el.className="ggskin ggskin_text "; el.ggType='text'; hs =''; hs+='z-index: 100;'; hs+='height : 20px;'; hs+='left : -10000px;'; hs+='position : absolute;'; hs+='top : -170px;'; hs+='visibility : hidden;'; hs+='width : 140px;'; hs+='pointer-events:none;'; hs+='transform:translate3d(0px,0px,40px) rotateX(-90deg); font-size: 15px; -webkit-backface-visibility: hidden; backface-visibility: hidden;'; el.setAttribute('style',hs); el.style[domTransform + 'Origin']='50% 100%'; hs ='position:absolute;'; hs += 'box-sizing: border-box;'; hs+='cursor: default;'; hs+='left: 0px;'; hs+='top: 0px;'; hs+='width: auto;'; hs+='height: auto;'; hs+='pointer-events: none;'; hs+='background: #000000;'; hs+='background: rgba(0,0,0,0.666667);'; hs+='border: 1px solid #000000;'; hs+='color: rgba(255,255,255,1);'; hs+='font-size: 16px;'; hs+='font-weight: inherit;'; hs+='text-align: center;'; hs+='white-space: nowrap;'; hs+='padding: 2px 3px 2px 3px;'; hs+='overflow: hidden;'; els.setAttribute('style',hs); els.innerHTML=me.hotspot.title; el.appendChild(els); me._tt_ht_3d.ggIsActive=function() { if ((this.parentNode) && (this.parentNode.ggIsActive)) { return this.parentNode.ggIsActive(); } return false; } el.ggElementNodeId=function() { if ((this.parentNode) && (this.parentNode.ggElementNodeId)) { return this.parentNode.ggElementNodeId(); } return me.ggNodeId; } me._tt_ht_3d.logicBlock_visible = function() { var newLogicStateVisible; if ( ((player.getIsTour() == false)) && ((me.hotspot.title != "")) && ((me.elementMouseOver['ht_node'] == true)) && ((player.getVariableValue('opt_3d_preview') == true)) ) { newLogicStateVisible = 0; } else { newLogicStateVisible = -1; } if (me._tt_ht_3d.ggCurrentLogicStateVisible != newLogicStateVisible) { me._tt_ht_3d.ggCurrentLogicStateVisible = newLogicStateVisible; me._tt_ht_3d.style[domTransition]=''; if (me._tt_ht_3d.ggCurrentLogicStateVisible == 0) { me._tt_ht_3d.style.visibility=(Number(me._tt_ht_3d.style.opacity)>0||!me._tt_ht_3d.style.opacity)?'inherit':'hidden'; me._tt_ht_3d.ggVisible=true; } else { me._tt_ht_3d.style.visibility="hidden"; me._tt_ht_3d.ggVisible=false; } } } me._tt_ht_3d.ggUpdatePosition=function (useTransition) { if (useTransition==='undefined') { useTransition = false; } if (!useTransition) { this.style[domTransition]='none'; } if (this.parentNode) { var pw=this.parentNode.clientWidth; var w=this.offsetWidth + 2; this.style.left=(this.ggDx + pw/2 - w/2) + 'px'; } this.style[domTransition]='left 0'; this.ggTextDiv.style.left=((142-this.ggTextDiv.offsetWidth)/2) + 'px'; } me._ht_node.appendChild(me._tt_ht_3d); el=me._ht_node_customimage=document.createElement('div'); els=me._ht_node_customimage__img=document.createElement('img'); els.className='ggskin ggskin_external'; els.setAttribute('style','position: absolute;-webkit-user-drag:none;pointer-events:none;;'); els.onload=function() {me._ht_node_customimage.ggUpdatePosition();} if ((hotspot) && (hotspot.customimage)) { el.ggText=hotspot.customimage; els.setAttribute('src', hotspot.customimage); els.style.width=hotspot.customimagewidth + 'px'; els.style.height=hotspot.customimageheight + 'px'; me.ggUse3d = hotspot.use3D; me.gg3dDistance = hotspot.distance3D; } els['ondragstart']=function() { return false; }; player.checkLoaded.push(els); hs =''; el.appendChild(els); el.ggSubElement = els; el.ggId="ht_node_CustomImage"; el.ggDx=0; el.ggParameter={ rx:0,ry:0,a:0,sx:1,sy:1 }; el.ggVisible=true; el.className="ggskin ggskin_external "; el.ggType='external'; hs =''; hs+='border : 0px solid #000000;'; hs+='cursor : pointer;'; hs+='height : 50px;'; hs+='left : -10000px;'; hs+='position : absolute;'; hs+='top : -140px;'; hs+='visibility : inherit;'; hs+='width : 50px;'; hs+='pointer-events:auto;'; el.setAttribute('style',hs); el.style[domTransform + 'Origin']='50% 50%'; me._ht_node_customimage.ggIsActive=function() { if ((this.parentNode) && (this.parentNode.ggIsActive)) { return this.parentNode.ggIsActive(); } return false; } el.ggElementNodeId=function() { if ((this.parentNode) && (this.parentNode.ggElementNodeId)) { return this.parentNode.ggElementNodeId(); } return me.ggNodeId; } me._ht_node_customimage.logicBlock_visible = function() { var newLogicStateVisible; if ( ((me.hotspot.customimage == "")) ) { newLogicStateVisible = 0; } else { newLogicStateVisible = -1; } if (me._ht_node_customimage.ggCurrentLogicStateVisible != newLogicStateVisible) { me._ht_node_customimage.ggCurrentLogicStateVisible = newLogicStateVisible; me._ht_node_customimage.style[domTransition]=''; if (me._ht_node_customimage.ggCurrentLogicStateVisible == 0) { me._ht_node_customimage.style.visibility="hidden"; me._ht_node_customimage__img.src = ''; me._ht_node_customimage.ggVisible=false; } else { me._ht_node_customimage.style.visibility=(Number(me._ht_node_customimage.style.opacity)>0||!me._ht_node_customimage.style.opacity)?'inherit':'hidden'; me._ht_node_customimage.ggSubElement.src=me._ht_node_customimage.ggText; me._ht_node_customimage.ggVisible=true; } } } me._ht_node_customimage.ggUpdatePosition=function (useTransition) { if (useTransition==='undefined') { useTransition = false; } if (!useTransition) { this.style[domTransition]='none'; } if (this.parentNode) { var pw=this.parentNode.clientWidth; var w=this.offsetWidth; this.style.left=(this.ggDx + pw/2 - w/2) + 'px'; } var parentWidth = me._ht_node_customimage.clientWidth; var parentHeight = me._ht_node_customimage.clientHeight; var img = me._ht_node_customimage__img; var aspectRatioDiv = me._ht_node_customimage.clientWidth / me._ht_node_customimage.clientHeight; var aspectRatioImg = img.naturalWidth / img.naturalHeight; if (img.naturalWidth < parentWidth) parentWidth = img.naturalWidth; if (img.naturalHeight < parentHeight) parentHeight = img.naturalHeight; var currentWidth,currentHeight; if ((hotspot) && (hotspot.customimage)) { currentWidth = hotspot.customimagewidth; currentHeight = hotspot.customimageheight; } img.style.left='50%'; img.style.marginLeft='-' + currentWidth/2 + 'px'; img.style.top='50%'; img.style.marginTop='-' + currentHeight/2 + 'px'; } me._ht_node.appendChild(me._ht_node_customimage); if ((hotspot) && (hotspot.customimage)) { el.style.width=hotspot.customimagewidth + 'px'; el.style.height=hotspot.customimageheight + 'px'; } me.__div = me._ht_node; }; me.addSkinHotspot=function(hotspot) { var hsinst = null; { hotspot.skinid = 'ht_node'; hsinst = new SkinHotspotClass_ht_node(me, hotspot); if (!hotspotTemplates.hasOwnProperty(hotspot.skinid)) { hotspotTemplates[hotspot.skinid] = []; } hotspotTemplates[hotspot.skinid].push(hsinst); me.callChildLogicBlocksHotspot_ht_node_sizechanged();; me.callChildLogicBlocksHotspot_ht_node_changenode();; me.callChildLogicBlocksHotspot_ht_node_configloaded();; me.callChildLogicBlocksHotspot_ht_node_mouseover();; me.callChildLogicBlocksHotspot_ht_node_active();; me.callChildLogicBlocksHotspot_ht_node_changevisitednodes();; me.callChildLogicBlocksHotspot_ht_node_varchanged_opt_3d_preview();; } return hsinst; } me.removeSkinHotspots=function() { if(hotspotTemplates['ht_node']) { var i; for(i = 0; i < hotspotTemplates['ht_node'].length; i++) { hotspotTemplates['ht_node'][i] = null; } } hotspotTemplates = []; } me.addSkin(); var style = document.createElement('style'); style.type = 'text/css'; style.appendChild(document.createTextNode('.ggskin { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px;}')); document.head.appendChild(style); player.addListener('sizechanged', function(args) { me.callChildLogicBlocksHotspot_ht_node_sizechanged(); }); player.addListener('changenode', function(args) { me.callChildLogicBlocksHotspot_ht_node_changenode(); }); player.addListener('configloaded', function(args) { me.callChildLogicBlocksHotspot_ht_node_configloaded(); }); player.addListener('mouseover', function(args) { me.callChildLogicBlocksHotspot_ht_node_mouseover(); }); player.addListener('changenode', function(args) { me.callChildLogicBlocksHotspot_ht_node_active(); }); player.addListener('changevisitednodes', function(args) { me.callChildLogicBlocksHotspot_ht_node_changevisitednodes(); }); player.addListener('varchanged_opt_3d_preview', function(args) { me.callChildLogicBlocksHotspot_ht_node_varchanged_opt_3d_preview(); }); player.addListener('hotspotsremoved', function(args) { me.removeSkinHotspots(); }); me.skinTimerEvent(); };