fix(panoramax): improve lifecycle management and error handling#110
Open
arno974 wants to merge 3 commits into3liz:masterfrom
Open
fix(panoramax): improve lifecycle management and error handling#110arno974 wants to merge 3 commits into3liz:masterfrom
arno974 wants to merge 3 commits into3liz:masterfrom
Conversation
…rs d'initialisation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
my_own_feature_X.Y.jswhereX.Yis the version of LWC usedREADME.mdwith a small picture/GIF of the featureLabel: sponsored development
Funded by Geolab