Refactor code of select/unselect portal. Add hook 'portalSelected' with guid of selected and unselected portal.

This commit is contained in:
Xelio
2013-09-05 01:52:22 +08:00
parent a77cf50e42
commit 8f1442e1dd
2 changed files with 35 additions and 40 deletions

View File

@ -15,6 +15,8 @@
// required to successfully boot the plugin.
//
// Heres more specific information about each event:
// portalSelected: called when portal on map is selected/unselected.
// Provide guid of selected and unselected portal.
// mapDataRefreshStart: called when we start refreshing map data
// mapDataRefreshEnd: called when we complete the map data load
// portalAdded: called when a portal has been received and is about to
@ -45,6 +47,7 @@
window._hooks = {}
window.VALID_HOOKS = [
'portalSelected',
'mapDataRefreshStart', 'mapDataRefreshEnd',
'portalAdded', 'portalDetailsUpdated',
'publicChatDataAvailable', 'factionChatDataAvailable',