fix: release 2.2.1

This commit is contained in:
Basile Bruneau
2022-02-12 20:46:38 +01:00
parent d95b824138
commit 0e42830e29
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "dotted-map",
"version": "2.2.0",
"version": "2.2.1",
"description": "Create a SVG map filled with dots for the world or countries",
"main": "./index.js",
"exports": {
+5 -2
View File
@@ -17,7 +17,7 @@ function DottedMapWithoutCountries({ map, avoidOuterPins = false }) {
return {
addPin({ lat, lng, data, svgOptions }) {
const pin = getPin({ lat, lng });
const pin = this.getPin({ lat, lng });
const point = { ...pin, data, svgOptions };
points[[x, y].join(';')] = point;
@@ -50,7 +50,10 @@ function DottedMapWithoutCountries({ map, avoidOuterPins = false }) {
const [localLng, localLat] = proj4(
proj4.defs('GOOGLE'),
proj4.defs('WGS84'),
[localx, localy],
[
(localx * X_RANGE) / width + X_MIN,
Y_MAX - (localy * Y_RANGE) / height,
],
);
const pin = { x: localx, y: localy, lat: localLat, lng: localLng };