From 807d24f97d6e09518f05cc96fdc9af07f2c27cd6 Mon Sep 17 00:00:00 2001 From: Lucio Zambon <lucio.zambon@elettra.eu> Date: Fri, 24 Jan 2025 02:25:20 +0000 Subject: [PATCH] Update panther.js --- panther.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/panther.js b/panther.js index 8b05db3..6d6c020 100644 --- a/panther.js +++ b/panther.js @@ -251,8 +251,8 @@ import WebGPURenderer from 'three/addons/renderers/webgpu/WebGPURenderer.js'; } function initShortcut(lattice) { const index = []; - for (let l in lattice.conf.shortcut) { - const cmd = "document.location = document.location.pathname + '?"+lattice.conf.shortcut[l]+"';"; + for (let l in lattice.conf.shortcut['3d']) { + const cmd = "document.location = document.location.pathname + '?"+lattice.conf.shortcut['3d'][l]+"';"; index.push('<button onclick="'+cmd+'" id="'+l.toLowerCase().split(' ').join('')+'">'+l+'</button>'); } $('body').append('<div style="position: absolute; left: 5px; bottom: 5px;">'+index.join(' ')+'</div>'); @@ -334,7 +334,7 @@ import WebGPURenderer from 'three/addons/renderers/webgpu/WebGPURenderer.js'; setInterval(updateVlv, 1000); } if (document.location.search.indexOf('search=')>-1) findComponent(document.location.search.split('search=')[1].split('&')[0], false); - if (lattice.conf && lattice.conf.shortcut) initShortcut(lattice); + if (lattice.conf && lattice.conf.shortcut["3d"]) initShortcut(lattice); if (lattice.conf && lattice.conf.index) initIndex(lattice); console.log(lattice, facilities); if (ps) { -- GitLab