bjornd / jvectormap

jvectormap.com
GNU Affero General Public License v3.0
1.39k stars 430 forks source link

Clear state #442

Open dorianrod opened 6 years ago

dorianrod commented 6 years ago

Hi,

clearSelectedRegions or selectedCountries doesn't unselect regions.

1) map.selectedCountries({ RU: true, FR: false }) => FR won't be unselected, OK to select RU

2) map.clearSelectedRegions() works if regions have been selected by clicking on the map, but not if you are selecting a region with selectedCountries function.

NB: if someone is able to tell me how to use src sources with webpack i can probably fix it.

Have a good day,

Dorian

dorianrod commented 6 years ago

2) is my mistake. For 1), just use map.clearSelectedRegions() then you can select your regions. So no need a fix i guess