Portal size tweak

Slight change so that level 1 and level 2 portals aren't the same size
anymore. Also, make exception for unclaimed portals so they aren't a
tiny dot.
This commit is contained in:
vita10gy 2013-02-23 16:20:55 -06:00
parent 8875f37629
commit f8215107fc

View File

@ -261,8 +261,11 @@ window.renderPortal = function(ent) {
// pre-loads player names for high zoom levels // pre-loads player names for high zoom levels
loadPlayerNamesForPortal(ent[2]); loadPlayerNamesForPortal(ent[2]);
var lvWeight = Math.max(2, portalLevel / 1.5); var lvWeight = Math.max(2, Math.floor(portalLevel) / 1.5);
var lvRadius = Math.max(portalLevel + 3, 5); var lvRadius = Math.floor(portalLevel) + 4;
if(team === window.TEAM_NONE) {
lvRadius = 7;
}
var p = L.circleMarker(latlng, { var p = L.circleMarker(latlng, {
radius: lvRadius + (L.Browser.mobile ? PORTAL_RADIUS_ENLARGE_MOBILE : 0), radius: lvRadius + (L.Browser.mobile ? PORTAL_RADIUS_ENLARGE_MOBILE : 0),