(methodName, globalMethod)
| 142865 | }; |
| 142866 | } |
| 142867 | function geoMethod(methodName, globalMethod) { |
| 142868 | return function(projection, geojson, group) { |
| 142869 | if (projection) { |
| 142870 | // projection defined, use it |
| 142871 | const p = getScale(projection, (group || this).context); |
| 142872 | return p && p.path[methodName](geojson); |
| 142873 | } else // projection undefined, use global method |
| 142874 | return globalMethod(geojson); |
| 142875 | }; |
| 142876 | } |
| 142877 | const geoArea = geoMethod("area", (0, _d3Geo.geoArea)); |
| 142878 | const geoBounds = geoMethod("bounds", (0, _d3Geo.geoBounds)); |
| 142879 | const geoCentroid = geoMethod("centroid", (0, _d3Geo.geoCentroid)); |
no test coverage detected