diff --git a/code/hooks.js b/code/hooks.js index d980c626..9da8bddc 100644 --- a/code/hooks.js +++ b/code/hooks.js @@ -23,7 +23,8 @@ // code/map_data.js#renderPortal near the end. Will hand // the Leaflet CircleMarker for the portal in "portal" var. // portalDetailsUpdated: fired after the details in the sidebar have -// been (re-)rendered +// been (re-)rendered. Provides data about the portal that +// has been selected. window._hooks = {} window.VALID_HOOKS = ['portalAdded', 'portalDetailsUpdated']; diff --git a/code/portal_detail_display.js b/code/portal_detail_display.js index 3f5d6ac5..88d42d38 100644 --- a/code/portal_detail_display.js +++ b/code/portal_detail_display.js @@ -1,4 +1,3 @@ - // PORTAL DETAILS MAIN /////////////////////////////////////////////// // main code block that renders the portal details in the sidebar and // methods that highlight the portal in the map view. @@ -71,7 +70,7 @@ window.renderPortalDetails = function(guid) { // weren’t available yet. resolvePlayerNames(); - runHooks('portalDetailsUpdated', {}); + runHooks('portalDetailsUpdated', {portalDetails: d}); } // draws link-range and hack-range circles around the portal with the