Update portal coloring on new data
Change Highlight Weakened Portals to update portal coloring on new data for portals being loaded. Before a page refresh was needed to see portal color changes when a portal was recharged.
This commit is contained in:
parent
b1860ee921
commit
e76fd84238
@ -78,8 +78,17 @@ window.plugin.portalWeakness.portalAdded = function(data) {
|
||||
}
|
||||
}
|
||||
|
||||
window.plugin.portalWeakness.portalDataLoaded = function(data) {
|
||||
$.each(data.portals, function(ind, portal) {
|
||||
if(window.portals[portal[0]]) {
|
||||
window.plugin.portalWeakness.portalAdded({portal: window.portals[portal[0]]});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var setup = function() {
|
||||
window.addHook('portalAdded', window.plugin.portalWeakness.portalAdded);
|
||||
window.addHook('portalDataLoaded', window.plugin.portalWeakness.portalDataLoaded);
|
||||
window.COLOR_SELECTED_PORTAL = '#f0f';
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user