fix: release 2.2.1
This commit is contained in:
+1
-1
@@ -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": {
|
||||
|
||||
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user