add portalDetailsUpdated hook
This commit is contained in:
parent
9cb2722eb2
commit
cd23248576
@ -22,9 +22,11 @@
|
||||
// shown at all. Injection point is in
|
||||
// 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
|
||||
|
||||
window._hooks = {}
|
||||
window.VALID_HOOKS = ['portalAdded'];
|
||||
window.VALID_HOOKS = ['portalAdded', 'portalDetailsUpdated'];
|
||||
|
||||
window.runHooks = function(event, data) {
|
||||
if(VALID_HOOKS.indexOf(event) === -1) throw('Unknown event type: ' + event);
|
||||
|
@ -70,6 +70,8 @@ window.renderPortalDetails = function(guid) {
|
||||
// try to resolve names that were required for above functions, but
|
||||
// weren’t available yet.
|
||||
resolvePlayerNames();
|
||||
|
||||
runHooks('portalDetailsUpdated', {});
|
||||
}
|
||||
|
||||
// draws link-range and hack-range circles around the portal with the
|
||||
|
Loading…
x
Reference in New Issue
Block a user