Changeset 157 for binary-improvements
- Timestamp:
- Sep 3, 2014, 12:36:43 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/webserver/js/index.js
r155 r157 133 133 var overlays = { 134 134 "Region files": regionLayer, 135 "Players (online) " : playersOnlineMarkerGroup,136 "Players (offline) " : playersOfflineMarkerGroup135 "Players (online) (<span id='mapControlOnlineCount'>0</span>)" : playersOnlineMarkerGroup, 136 "Players (offline) (<span id='mapControlOfflineCount'>0</span>)" : playersOfflineMarkerGroup 137 137 }; 138 138 … … 149 149 150 150 var setPlayerMarkers = function(data) { 151 var online = 0; 152 var offline = 0; 151 153 $.each( data, function( key, val ) { 152 154 var marker; … … 171 173 val.currentPosMarker = marker; 172 174 playersMappingList[val.steamid] = val; 175 176 if (val.online) 177 online++; 178 else 179 offline++; 173 180 }); 181 $( "#mapControlOnlineCount" ).text( online ); 182 $( "#mapControlOfflineCount" ).text( offline ); 174 183 } 175 184
Note:
See TracChangeset
for help on using the changeset viewer.