Merge pull request #22 from JasonMillward/gh-pages
Added portal mod information to span tool tips
This commit is contained in:
@ -34,8 +34,19 @@ window.getModDetails = function(d) {
|
||||
mods.push('');
|
||||
modsTitle.push('');
|
||||
} else if(mod.type === 'RES_SHIELD') {
|
||||
mods.push(mod.rarity + ' ' + mod.displayName);
|
||||
modsTitle.push(mod.rarity + ' ' + mod.displayName + '\ninstalled by: '+getPlayerName(mod.installingUser));
|
||||
|
||||
var title = mod.rarity.capitalize() + ' ' + mod.displayName + '\n';
|
||||
title += 'Installed by: '+ getPlayerName(mod.installingUser);
|
||||
|
||||
title += '\nStats:';
|
||||
for (var key in mod.stats) {
|
||||
if (mod.stats.hasOwnProperty(key)) {
|
||||
title += '\n+' + mod.stats[key] + ' ' + key.capitalize();
|
||||
}
|
||||
}
|
||||
|
||||
mods.push(mod.rarity.capitalize() + ' ' + mod.displayName);
|
||||
modsTitle.push(title);
|
||||
} else {
|
||||
mods.push(mod.type);
|
||||
modsTitle.push('Unknown mod. No further details available.');
|
||||
|
@ -86,8 +86,6 @@ window.unixTimeToHHmm = function(time) {
|
||||
return h + ':' + s;
|
||||
}
|
||||
|
||||
|
||||
|
||||
window.rangeLinkClick = function() {
|
||||
if(window.portalRangeIndicator)
|
||||
window.map.fitBounds(window.portalRangeIndicator.getBounds());
|
||||
@ -100,7 +98,6 @@ window.reportPortalIssue = function(info) {
|
||||
location.href = 'https://support.google.com/ingress?hl=en';
|
||||
}
|
||||
|
||||
|
||||
window._storedPaddedBounds = undefined;
|
||||
window.getPaddedBounds = function() {
|
||||
if(_storedPaddedBounds === undefined) {
|
||||
@ -129,7 +126,6 @@ window.getMinPortalLevel = function() {
|
||||
return conv[z];
|
||||
}
|
||||
|
||||
|
||||
// returns number of pixels left to scroll down before reaching the
|
||||
// bottom. Works similar to the native scrollTop function.
|
||||
window.scrollBottom = function(elm) {
|
||||
@ -137,8 +133,11 @@ window.scrollBottom = function(elm) {
|
||||
return elm.get(0).scrollHeight - elm.innerHeight() - elm.scrollTop();
|
||||
}
|
||||
|
||||
|
||||
window.zoomToAndShowPortal = function(guid, latlng) {
|
||||
renderPortalDetails(guid);
|
||||
map.setView(latlng, 17);
|
||||
}
|
||||
|
||||
String.prototype.capitalize = function() {
|
||||
return this.charAt(0).toUpperCase() + this.slice(1).toLowerCase();
|
||||
}
|
||||
|
Reference in New Issue
Block a user