leaflet-geometryutil
Advanced tools
Comparing version 0.10.0 to 0.10.1
{ | ||
"name": "leaflet-geometryutil", | ||
"version": "0.10.0", | ||
"version": "0.10.1", | ||
"description": "Leaflet utility functions on geometries", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -50,2 +50,6 @@ Leaflet.GeometryUtil | ||
### 0.10.1 ### | ||
* Enhance precision for meter values (metric / imperial) (#94, thanks @karlbeecken) | ||
### 0.10.0 ### | ||
@@ -52,0 +56,0 @@ |
describe('Readable distances', function() { | ||
it('It should be meters by default', function(done) { | ||
assert.equal("0 m", L.GeometryUtil.readableDistance(0)); | ||
assert.equal("0.0 m", L.GeometryUtil.readableDistance(0)); | ||
done(); | ||
}); | ||
it('It should be 0 yd if imperial', function(done) { | ||
assert.equal("0 yd", L.GeometryUtil.readableDistance(0, 'imperial')); | ||
it('It should be 0.0 yd if imperial', function(done) { | ||
assert.equal("0.0 yd", L.GeometryUtil.readableDistance(0, 'imperial')); | ||
done(); | ||
@@ -10,0 +10,0 @@ }); |
@@ -76,3 +76,3 @@ // Packaging/modules magic dance. | ||
else { | ||
distanceStr = Math.ceil(distance) + ' m'; | ||
distanceStr = distance.toFixed(1) + ' m'; | ||
} | ||
@@ -86,3 +86,3 @@ } | ||
else { | ||
distanceStr = Math.ceil(distance) + ' yd'; | ||
distanceStr = distance.toFixed(1) + ' yd'; | ||
} | ||
@@ -89,0 +89,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
1656778
168