vue-world-map icon indicating copy to clipboard operation
vue-world-map copied to clipboard

Hover events added

Open mrityunjaygr8 opened this issue 5 years ago • 3 comments

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

mrityunjaygr8 avatar Aug 28 '19 19:08 mrityunjaygr8

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.

frossigneux avatar Jan 27 '20 10:01 frossigneux

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 avatar Feb 06 '20 05:02 mrityunjaygr8

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", .... }

mrityunjaygr8 avatar Feb 06 '20 07:02 mrityunjaygr8