react-simple-maps
Advanced tools
Comparing version 0.5.3 to 0.6.0
@@ -99,3 +99,4 @@ "use strict"; | ||
this.setState({ | ||
hover: false | ||
hover: false, | ||
pressed: false | ||
}, function () { | ||
@@ -102,0 +103,0 @@ return onMouseLeave && onMouseLeave(geography, evt); |
@@ -31,3 +31,6 @@ "use strict"; | ||
miller: _d3GeoProjection.geoMiller, | ||
times: _d3GeoProjection.geoTimes | ||
times: _d3GeoProjection.geoTimes, | ||
robinson: _d3GeoProjection.geoRobinson, | ||
winkel3: _d3GeoProjection.geoWinkel3, | ||
eckert4: _d3GeoProjection.geoEckert4 | ||
}; |
@@ -178,4 +178,2 @@ "use strict"; | ||
var backdropDimensions = [projection().scale() / 100 * width, projection().scale() / 100 * height]; | ||
return _react2.default.createElement( | ||
@@ -182,0 +180,0 @@ "g", |
{ | ||
"name": "react-simple-maps", | ||
"version": "0.5.3", | ||
"version": "0.6.0", | ||
"description": "An svg map component built with and for React", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -115,3 +115,3 @@ # react-simple-maps | ||
`<ComponentMap />` forms the wrapper around your map. It defines the dimensions of the map and sets the projection used by Geographies, Markers, and Annotations, to position elements. By default the maps use the "times" projection, but `react-simple-maps` also supports "mercator" and "miller" projections out of the box. Additionally you can plug in a custom projection of your choice. All projections from `d3-geo-projections` are supported. | ||
`<ComponentMap />` forms the wrapper around your map. It defines the dimensions of the map and sets the projection used by Geographies, Markers, and Annotations, to position elements. By default the maps use the "times" projection, but `react-simple-maps` also supports `robinson`, `eckert4`, `winkel3`, `mercator`, and `miller` projections out of the box. Additionally you can plug in a custom projection of your choice. All projections from `d3-geo-projections` are supported. | ||
@@ -118,0 +118,0 @@ ##### Props |
@@ -54,2 +54,3 @@ | ||
hover: false, | ||
pressed: false, | ||
}, () => onMouseLeave && onMouseLeave(geography, evt)) | ||
@@ -56,0 +57,0 @@ } |
@@ -5,5 +5,8 @@ | ||
geoMiller, | ||
geoRobinson, | ||
geoWinkel3, | ||
geoEckert4, | ||
} from "d3-geo-projection" | ||
import { | ||
geoMercator | ||
geoMercator, | ||
} from "d3-geo" | ||
@@ -17,2 +20,5 @@ | ||
times: geoTimes, | ||
robinson: geoRobinson, | ||
winkel3: geoWinkel3, | ||
eckert4: geoEckert4, | ||
} | ||
@@ -19,0 +25,0 @@ |
@@ -118,7 +118,2 @@ | ||
const backdropDimensions = [ | ||
(projection().scale()) / 100 * width, | ||
(projection().scale()) / 100 * height, | ||
] | ||
return ( | ||
@@ -125,0 +120,0 @@ <g className="rsm-zoomable-group" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
936317
4274