This commit is contained in:
Stefan Breunig
2013-02-10 20:05:46 +01:00
parent a6ae188548
commit 1816e153f6

View File

@ -141,8 +141,13 @@ window.scrollBottom = function(elm) {
} }
window.zoomToAndShowPortal = function(guid, latlng) { window.zoomToAndShowPortal = function(guid, latlng) {
renderPortalDetails(guid);
map.setView(latlng, 17); map.setView(latlng, 17);
// if the data is available, render it immediately. Otherwise defer
// until it becomes available.
if(window.portals[guid])
renderPortalDetails(guid);
else
urlPortal = guid;
} }
// translates guids to entity types // translates guids to entity types
@ -154,7 +159,7 @@ window.getTypeByGuid = function(guid) {
// .b == fields // .b == fields
// .c == player/creator // .c == player/creator
// .d == chat messages // .d == chat messages
// //
// resonator guid is [portal guid]-resonator-[slot] // resonator guid is [portal guid]-resonator-[slot]
switch(guid.slice(33)) { switch(guid.slice(33)) {
case '11': case '11':