Skip to content

Commit

Permalink
style: correct events names for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
themustafaomar committed Sep 2, 2021
1 parent 6550edc commit 1944579
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/js/Defaults/Events.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default {
onViewportChange: 'viewport:changed',
onRegionSelected: 'region:select',
onMarkerSelected: 'marker:select',
onRegionSelected: 'region:selected',
onMarkerSelected: 'marker:selected',
onRegionTooltipShow: 'region.tooltip:show',
onMarkerTooltipShow: 'marker.tooltip:show',
onLoaded: 'map:loaded',
Expand Down
2 changes: 1 addition & 1 deletion src/js/Map/handleElementEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function parseEvent(map, selector, isTooltip) {
elClassList = ele.attr('class'),
type = elClassList.indexOf('jvm-region') === -1 ? 'marker' : 'region',
code = type === 'region' ? ele.attr('data-code') : ele.attr('data-index'),
event = `${type}:select`
event = `${type}:selected`

// Init tooltip event
if (isTooltip) {
Expand Down

0 comments on commit 1944579

Please sign in to comment.