From b0d9a2c7ade2b582ded138218560a85ed15d037f Mon Sep 17 00:00:00 2001 From: mattiapezzotti Date: Sun, 14 Jul 2024 10:13:16 +0200 Subject: [PATCH] fixing the mess --- modules/svg/panoramax_images.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/modules/svg/panoramax_images.js b/modules/svg/panoramax_images.js index cc106aa3e..f5edef387 100644 --- a/modules/svg/panoramax_images.js +++ b/modules/svg/panoramax_images.js @@ -14,6 +14,7 @@ export function svgPanoramaxImages(projection, context, dispatch) { let _panoramax; let _viewerYaw = 0; let _selectedSequence; + let _activeId; function init() { if (svgPanoramaxImages.initialized) return; @@ -62,7 +63,15 @@ export function svgPanoramaxImages(projection, context, dispatch) { }); } if (username && service) { - let id = await service.getUserId(username); + if (!_activeId) { + const tempId = await service.getUserId(username); + + if (!_activeId) { + _activeId = tempId; + } + } + + let id = _activeId; images = images.filter(function(image) { return id === image.account_id; @@ -98,7 +107,15 @@ export function svgPanoramaxImages(projection, context, dispatch) { }); } if (username && service) { - let id = await service.getUserId(username); + if (!_activeId) { + const tempId = await service.getUserId(username); + + if (!_activeId) { + _activeId = tempId; + } + } + + let id = _activeId; sequences = sequences.filter(function(sequence) { return id === sequence.properties.account_id;