Skip to content

Conversation

@mrityunjaygr8
Copy link

mouseenter and mouseleave event listeners added so that additional data/effects can be shown on hover of the country.
Readme updated to document the same functionality

@frossigneux
Copy link

Hello @mrityunjaygr8, thanks for your PR.

Could you add an example in the doc on how to get the current selected country and its value?
Currently I get a VueComponent with many nested properties, and I don't know how to retrieve data about the current country, in order to display a tooltip.

I think also that the color bar should be deactivable with a property.

@mrityunjaygr8
Copy link
Author

Hi @frossigneux
Yes the color bar should be deactivatable via a property, I will push a patch for that soon.
Regarding the example, I'll try to add an example.

@mrityunjaygr8
Copy link
Author

Hi @frossigneux

I've updated the package now.
The colorBar is now optional using the showColorBar property.
Further, I've corrected my mistake due to which on_mouseleave and on_mouseneter were throwing extra data about the VueComponent. Now they are returning the Country's ISO 3166 Code, which we use in the countryData propery, so we can get the value from the countryData propery itself.

In order to show the country's full name, currently I use another Object which has the ISO 3166 code as the key and Country's full name as the value.
eg.
country_full_name = {
"US": "United States",
....
}

suggested by @mulhoon
replaced :v-if by v-if

Co-Authored-By: Nic Mulvaney <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants