d3-geo-scale-bar
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -1,2 +0,2 @@ | ||
// https://github.com/HarryStevens/d3-geo-scale-bar Version 1.2.0. Copyright 2022 Harry Stevens. | ||
// https://github.com/HarryStevens/d3-geo-scale-bar Version 1.2.1. Copyright 2022 Harry Stevens. | ||
(function (global, factory) { | ||
@@ -238,2 +238,3 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
distance, | ||
distanceLog, | ||
tickFormat = function tickFormat(d) { | ||
@@ -284,3 +285,3 @@ return +d.toFixed(2); | ||
distance = barDistance; | ||
distanceLog = barDistance; | ||
} // The ticks and elements of the bar | ||
@@ -350,3 +351,3 @@ | ||
scaleBar.distance = function (_) { | ||
return arguments.length ? (distance = +_, scaleBar) : distance; | ||
return arguments.length ? (distance = +_, scaleBar) : distance || distanceLog; | ||
}; | ||
@@ -353,0 +354,0 @@ |
{ | ||
"name": "d3-geo-scale-bar", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Displays automatic scale bars for projected geospatial data.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -10,3 +10,3 @@ # d3-geo-scale-bar | ||
```html | ||
<script src="https://unpkg.com/d3-geo-scale-bar@1.2.1/build/d3-geo-scale-bar.min.js"></script> | ||
<script src="https://unpkg.com/d3-geo-scale-bar@1.2.2/build/d3-geo-scale-bar.min.js"></script> | ||
<script> | ||
@@ -13,0 +13,0 @@ |
@@ -14,2 +14,3 @@ import { default as geoDistance } from "./geo/distance"; | ||
distance, | ||
distanceLog, | ||
tickFormat = d => +d.toFixed(2), | ||
@@ -63,3 +64,3 @@ tickPadding = 2, | ||
distance = barDistance; | ||
distanceLog = barDistance; | ||
} | ||
@@ -167,3 +168,3 @@ | ||
scaleBar.distance = function(_) { | ||
return arguments.length ? (distance = +_, scaleBar) : distance; | ||
return arguments.length ? (distance = +_, scaleBar) : distance || distanceLog; | ||
} | ||
@@ -170,0 +171,0 @@ |
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
54603
768