Skip to content

fix(panoramax): improve lifecycle management and error handling#110

Open
arno974 wants to merge 3 commits into3liz:masterfrom
arno974:master
Open

fix(panoramax): improve lifecycle management and error handling#110
arno974 wants to merge 3 commits into3liz:masterfrom
arno974:master

Conversation

@arno974
Copy link
Copy Markdown
Contributor

@arno974 arno974 commented Apr 8, 2026

This PR improves the robustness of the Panoramax integration by addressing several issues related to resource loading and event management.

Resource loading : JS and CSS are now loaded in parallel with Promise.all, ensuring both are fully ready before initialization. URLs are extracted as constants (PANORAMAX_JS_URL, PANORAMAX_CSS_URL) to avoid duplication.

Event lifecycle : Map click and viewer event listeners are now stored as named references and properly removed on dock close via #removeMapEvent() and #removePanoramaxViewerEvent(). This prevents listener accumulation when opening/closing the dock repeatedly.

Minor cleanup : BUFFER_RADIUS, PANORAMAX_JS_URL AND PANORAMAX_CSS_URL are stored as a global variable

  • JavaScript are named according to the following pattern my_own_feature_X.Y.js where X.Y is the version of LWC used
  • Include a README.md with a small picture/GIF of the feature
  • I agree to the license of this repository : Mozilla Public License Version 2.0
  • I have added the docstring, according to the contributing guidelines.

Label: sponsored development
Funded by Geolab

arno974 added 3 commits April 8, 2026 14:46
- Renommage des deux fichiers JS pour une meilleur cohérence avec la version du viewer de Panoramax
- Portage vers Panoramax V4 avec Web Components (pnx-photo-viewer)
- Utilisation de oncePSVReady() pour garantir l'initialisation complète
- Correction de la signature select() : select(seqId, picId, force)
- Nettoyage optimisé du viewer pour éviter le cache de photos anciennes
- Documentation complète : différences V3/V4, recommandations, instructions claires
- Correction typos et suppression doublons
…place $.ajax() with modern Fetch API for better XHR handling; Remove jQuery DOM selectors, use vanilla document methods; Add JSDoc documentation for all functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant