Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f24ade7

Browse files
committedMay 17, 2019
refactor: various changes to make code more readable
Removed whitespace infront of a player's name. Removed some JS that wasn't needed. Updated websocket to use the "getPlayerData" stuff
1 parent f43cf75 commit f24ade7

File tree

4 files changed

+2
-10
lines changed

4 files changed

+2
-10
lines changed
 

‎index.php

-7
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,6 @@
115115
printFirstJs($debug);
116116
?>
117117

118-
<script>
119-
function startMarkers(){
120-
initMarkers(true);
121-
//initMarkers(false);
122-
}
123-
</script>
124-
125118
</head>
126119
<body>
127120

‎js/src/controls.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ $(document).ready(function(){
7272
.text(_isLive ? "on" : "off");
7373

7474
if (_isLive){
75-
_invervalId = setInterval(function(){ webSocket.send("getLocations"); }, 250);
75+
_invervalId = setInterval(function(){ webSocket.send("getPlayerData"); }, 250);
7676
}else{
7777
clearInterval(_invervalId);
7878
}

‎js/src/init.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
function globalInit() {
22
mapInit("map-canvas");
3-
startMarkers();
43
initPage()
54
}
65

‎js/src/socket.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ function doPlayerUpdate(players){
207207
//update popup with the information we have been sent
208208
var html = getPlayerInfoHtml(plr);
209209

210-
var infoContent = '<div class="info-window"><div class="info-header-box"><div class="info-icon"></div><div class="info-header">' + plr.name + '</div></div><div class="clear"></div><div id=info-body>' + html + "</div></div>";
210+
var infoContent = '<div class="info-window"><div class="info-header-box"><div class="info-header">' + plr.name + '</div></div><div class="clear"></div><div id=info-body>' + html + "</div></div>";
211211
var infoBox = new google.maps.InfoWindow({
212212
content: infoContent
213213
});

0 commit comments

Comments
 (0)
Please sign in to comment.