Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Pass original event to map click event handlers #182

Open
wants to merge 1 commit into from

2 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 10, 2013
  1. @tonydewan
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/world-map.js
View
6 lib/world-map.js
@@ -63,12 +63,12 @@
* @param {Function} params.onRegionLabelShow <code>(Event e, Object label, String code)</code> Will be called right before the region label is going to be shown.
* @param {Function} params.onRegionOver <code>(Event e, String code)</code> Will be called on region mouse over event.
* @param {Function} params.onRegionOut <code>(Event e, String code)</code> Will be called on region mouse out event.
- * @param {Function} params.onRegionClick <code>(Event e, String code)</code> Will be called on region click event.
+ * @param {Function} params.onRegionClick <code>(Event e, String code, Event originalEvent)</code> Will be called on region click event.
* @param {Function} params.onRegionSelected <code>(Event e, String code, Boolean isSelected, Array selectedRegions)</code> Will be called when region is (de)selected. <code>isSelected</code> parameter of the callback indicates whether region is selected or not. <code>selectedRegions</code> contains codes of all currently selected regions.
* @param {Function} params.onMarkerLabelShow <code>(Event e, Object label, String code)</code> Will be called right before the marker label is going to be shown.
* @param {Function} params.onMarkerOver <code>(Event e, String code)</code> Will be called on marker mouse over event.
* @param {Function} params.onMarkerOut <code>(Event e, String code)</code> Will be called on marker mouse out event.
- * @param {Function} params.onMarkerClick <code>(Event e, String code)</code> Will be called on marker click event.
+ * @param {Function} params.onMarkerClick <code>(Event e, String code, Event originalEvent)</code> Will be called on marker click event.
* @param {Function} params.onMarkerSelected <code>(Event e, String code, Boolean isSelected, Array selectedMarkers)</code> Will be called when marker is (de)selected. <code>isSelected</code> parameter of the callback indicates whether marker is selected or not. <code>selectedMarkers</code> contains codes of all currently selected markers.
* @param {Function} params.onViewportChange <code>(Event e, Number scale)</code> Triggered when the map's viewport is changed (map was panned or zoomed).
*/
@@ -431,7 +431,7 @@ jvm.WorldMap.prototype = {
element = type == 'region' ? map.regions[code].element : map.markers[code].element;
if (!mouseMoved) {
- map.container.trigger(clickEvent, [code]);
+ map.container.trigger(clickEvent, [code, e]);
if ((type === 'region' && map.params.regionsSelectable) || (type === 'marker' && map.params.markersSelectable)) {
if (!clickEvent.isDefaultPrevented()) {
if (map.params[type+'sSelectableOne']) {
Something went wrong with that request. Please try again.