diff --git a/css/main.css b/css/main.css index b48f12f..8a04749 100644 --- a/css/main.css +++ b/css/main.css @@ -264,3 +264,8 @@ html, body { margin: 0.3rem auto; max-width: 96px; } + +.pkmn-deployed { + width: 18px; + margin-left: -18px; +} diff --git a/js/main.js b/js/main.js index 10ab923..9e73413 100644 --- a/js/main.js +++ b/js/main.js @@ -280,12 +280,12 @@ var mapView = { }, zoom: 8, mapTypeId: 'roadmap', - styles: [ + styles: [ { "featureType": "road", "elementType": "geometry.fill", "stylers": [ { "color": "#4f9f92" }, { "visibility": "on" } ] }, { "featureType": "water", "elementType": "geometry.stroke", "stylers": [ { "color": "#feff95" }, { "visibility": "on" }, { "weight": 1.2 } ] }, { "featureType": "landscape", "elementType": "geometry", "stylers": [ { "color": "#adff9d" }, { "visibility": "on" } ] }, { "featureType": "water", "stylers": [ { "visibility": "on" }, { "color": "#147dd9" } ] }, - { "featureType": "poi", "elementType": "geometry.fill", "stylers": [ { "color": "#d3ffcc" } ] },{ "elementType": "labels", "stylers": [ { "visibility": "off" } ] } + { "featureType": "poi", "elementType": "geometry.fill", "stylers": [ { "color": "#d3ffcc" } ] },{ "elementType": "labels", "stylers": [ { "visibility": "off" } ] } ] }); self.placeTrainer(); @@ -606,7 +606,8 @@ var mapView = { pkmHP = pokemonData.stamina || 0, pkmMHP = pokemonData.stamina_max || 0, pkmIV = ((pkmIVA + pkmIVD + pkmIVS) / 45.0).toFixed(2), - pkmTime = pokemonData.creation_time_ms || 0; + pkmTime = pokemonData.creation_time_ms || 0, + pkmDeployed = ((pokemonData.deployed_fort_id) ? 1 : null); sortedPokemon.push({ "name": pkmnName, @@ -620,7 +621,8 @@ var mapView = { "health": pkmHP, "max_health": pkmMHP, "creation_time": pkmTime, - 'candy': self.getCandy(pkmID, user_id) + 'candy': self.getCandy(pkmID, user_id), + "deployed": pkmDeployed }); } switch (sortOn) { @@ -690,11 +692,13 @@ var mapView = { pkmnIVS = sortedPokemon[i].stamina, pkmnHP = sortedPokemon[i].health, pkmnMHP = sortedPokemon[i].max_health, - candyNum = self.getCandy(pkmnNum, user_id); + candyNum = self.getCandy(pkmnNum, user_id), + isDeployed = sortedPokemon[i].deployed; - out += '

' + - pkmnName + + out += '

'; + if(isDeployed) + out += ''; + out += pkmnName + '
'+ 'HP: ' + pkmnHP + ' / ' + pkmnMHP + '
CP:' + pkmnCP +