fix portal 40m range circle and link distance circle
This commit is contained in:
parent
2b68487c4b
commit
5a2771eb92
@ -218,6 +218,7 @@ window.getPortalMiscDetails = function(guid,d) {
|
|||||||
// draws link-range and hack-range circles around the portal with the
|
// draws link-range and hack-range circles around the portal with the
|
||||||
// given details. Clear them if parameter 'd' is null.
|
// given details. Clear them if parameter 'd' is null.
|
||||||
window.setPortalIndicators = function(p) {
|
window.setPortalIndicators = function(p) {
|
||||||
|
|
||||||
if(portalRangeIndicator) map.removeLayer(portalRangeIndicator);
|
if(portalRangeIndicator) map.removeLayer(portalRangeIndicator);
|
||||||
portalRangeIndicator = null;
|
portalRangeIndicator = null;
|
||||||
if(portalAccessIndicator) map.removeLayer(portalAccessIndicator);
|
if(portalAccessIndicator) map.removeLayer(portalAccessIndicator);
|
||||||
@ -231,7 +232,7 @@ window.setPortalIndicators = function(p) {
|
|||||||
// range is only known for sure if we have portal details
|
// range is only known for sure if we have portal details
|
||||||
// TODO? render a min range guess until details are loaded..?
|
// TODO? render a min range guess until details are loaded..?
|
||||||
|
|
||||||
var d = p.options.details;
|
var d = portalDetail.get(p.options.guid);
|
||||||
if (d) {
|
if (d) {
|
||||||
var range = getPortalRange(d);
|
var range = getPortalRange(d);
|
||||||
portalRangeIndicator = (range.range > 0
|
portalRangeIndicator = (range.range > 0
|
||||||
@ -276,7 +277,7 @@ window.selectPortal = function(guid) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setPortalIndicators(newPortal ? newPortal.options.details : null);
|
setPortalIndicators(newPortal);
|
||||||
|
|
||||||
runHooks('portalSelected', {selectedPortalGuid: guid, unselectedPortalGuid: oldPortalGuid});
|
runHooks('portalSelected', {selectedPortalGuid: guid, unselectedPortalGuid: oldPortalGuid});
|
||||||
return update;
|
return update;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user