Skip to content

Commit

Permalink
refactor(controls): add playerInsideCluser_onClick
Browse files Browse the repository at this point in the history
  • Loading branch information
TGRHavoc committed Jun 9, 2021
1 parent 6eb7c25 commit bb83dd7
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions js/src/controls.js
Expand Up @@ -144,18 +144,21 @@ export class Controls {
html.appendChild(child);
}

L.DomEvent.on(html, "click", function(e){
var t = e.target;
var attribute = t.getAttribute("data-identifier");
var m = PopupStore[localCache[attribute].marker]; // Get the marker using the localcache.

Map.closePopup(Map._popup); //Close the currently open popup
Map.openPopup(m); // Open the user's popup
});
// If they click on a username
L.DomEvent.on(html, "click", this.playerInsideCluster_onClick.bind(this));

Map.openPopup(html, a.layer.getLatLng());
}

playerInsideCluster_onClick(e){
var t = e.target;
var attribute = t.getAttribute("data-identifier");
var m = this.mapWrapper.PopupStore[this.mapWrapper.localCache[attribute].marker]; // Get the marker using the localcache.

Map.closePopup(Map._popup); //Close the currently open popup
Map.openPopup(m); // Open the user's popup
}

reconnect_onClick(e){

e.preventDefault();
Expand Down

0 comments on commit bb83dd7

Please sign in to comment.