1var currentIndex = 0; 2const panoramaLightbox = document.getElementById('panoramaGallery'); 3 4document.addEventListener('DOMContentLoaded', () => { 5 console.log('Panorama script loaded'); 6 7 if ( 8 !panoramaLightbox || 9 typeof panoramaImages === "undefined" 10 ) { 11 return; 12 } 13 14 let images = Object.values(panoramaImages).flat(); 15 images = images.slice(1, images.length - 1); 16 17 const viewer = pannellum.viewer('panoramaGallery', { 18 default: { 19 firstScene: '0', 20 autoLoad: false, 21 }, 22 scenes: { 23 0: { 24 type: 'equirectangular', 25 panorama: images[0].url 26 } 27 } 28 }); 29 30 images.forEach((imgObject, index) => { 31 if (index === 0) return; 32 viewer.addScene(String(index), { 33 type: "equirectangular", 34 panorama: imgObject.url, 35 autoLoad: false 36 }); 37 }); 38 39 const nextPan = document.getElementById('nextPan'); 40 nextPan && nextPan.addEventListener('click', () => { 41 if (currentIndex < images.length - 1) { 42 currentIndex++; 43 viewer.loadScene(String(currentIndex)); 44 } 45 }); 46 47 const prevPan = document.getElementById('prevPan'); 48 prevPan && prevPan.addEventListener('click', () => { 49 if (currentIndex > 0) { 50 currentIndex--; 51 viewer.loadScene(String(currentIndex)); 52 } 53 }); 54 55 const featuredPanoramaContainer = document.querySelector('.featured-panorama-container'); 56 featuredPanoramaContainer && featuredPanoramaContainer.addEventListener('click', () => { 57 openPanoramaLightbox(); 58 }); 59 60 document.querySelector('#panoramaLightboxClose').addEventListener("click", () => panoramaLightbox.style.display = "none"); 61 document.addEventListener("keydown", e => { if(e.key==="Escape") panoramaLightbox.style.display="none"; }); 62}); 63 64function openPanoramaLightbox() { 65 const panoramaLightbox = document.getElementById('panoramaGallery'); 66 panoramaLightbox.style.display = 'inherit'; 67}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.