Skip to content

Commit

Permalink
refactor: Renamed event to better illustrate when the event is called…
Browse files Browse the repository at this point in the history
… (and reduce confusion with "selecting" a marker").
  • Loading branch information
toepoke committed Mar 3, 2024
1 parent f48d5dd commit 80ce9b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mapsed.js
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@
* Shows the infoWindow for the location.
* @param {any} evt
*/
function onMarkerSelect(evt) {
function onMarkerClicked(evt) {
var canEdit = false;
var currMarker = this;
closeTooltips();
Expand Down Expand Up @@ -583,7 +583,7 @@
_markers.push(newMarker);
bounds.extend(centre);

gm.event.addListener(newMarker, "click", onMarkerSelect);
gm.event.addListener(newMarker, "click", onMarkerClicked);

gm.event.addListener(newMarker, "dragend", function (evt) {
var currMarker = this;
Expand Down Expand Up @@ -971,7 +971,7 @@
bounds.extend(position);

// wire up click event
gm.event.addListener(marker, "click", onMarkerSelect);
gm.event.addListener(marker, "click", onMarkerClicked);

if (model.autoShow) {
// show on load enabled for marker
Expand Down

0 comments on commit 80ce9b8

Please sign in to comment.