pass loaded portal details via a hook into the portal render code - so placeholder portals get updated (highlighters, etc) as you view them
This commit is contained in:
parent
bed576808b
commit
1fb27a75c4
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
|
|
||||||
window.Render = function() {
|
window.Render = function() {
|
||||||
|
|
||||||
this.portalMarkerScale = undefined;
|
this.portalMarkerScale = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,6 +69,13 @@ window.MapDataRequest = function() {
|
|||||||
|
|
||||||
// ensure we have some initial map status
|
// ensure we have some initial map status
|
||||||
this.setStatus ('startup', undefined, -1);
|
this.setStatus ('startup', undefined, -1);
|
||||||
|
|
||||||
|
// add a portalDetailLoaded hook, so we can use the exteneed details to update portals on the map
|
||||||
|
var _this = this;
|
||||||
|
addHook('portalDetailLoaded',function(data){
|
||||||
|
_this.render.processGameEntities([data.ent]);
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,8 +37,12 @@ var handleResponse = function(guid, data, success) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
|
|
||||||
var dict = decodeArray.portalDetail(data.result);
|
var dict = decodeArray.portalDetail(data.result);
|
||||||
|
|
||||||
|
// entity format, as used in map data
|
||||||
|
var ent = [guid,dict.timestamp,data.result];
|
||||||
|
|
||||||
cache.store(guid,dict);
|
cache.store(guid,dict);
|
||||||
|
|
||||||
//FIXME..? better way of handling sidebar refreshing...
|
//FIXME..? better way of handling sidebar refreshing...
|
||||||
@ -47,7 +51,7 @@ var handleResponse = function(guid, data, success) {
|
|||||||
renderPortalDetails(guid);
|
renderPortalDetails(guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
window.runHooks ('portalDetailLoaded', {guid:guid, success:success, details:dict});
|
window.runHooks ('portalDetailLoaded', {guid:guid, success:success, details:dict, ent:ent});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (data && data.error == "RETRY") {
|
if (data && data.error == "RETRY") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user