Comparing version 1.0.1 to 1.0.2
@@ -244,10 +244,15 @@ const findSegment = require('./find-segment'); | ||
function calcElevation(elevation) { | ||
if (elevation === undefined) { | ||
return; | ||
} | ||
if (unit === 'ft') { | ||
elevation *= 3.28084; | ||
} | ||
return Math.round(elevation); | ||
} | ||
function displayLabel({ elevation }) { | ||
if (elevation !== undefined) { | ||
if (unit === 'ft') { | ||
elevation *= 3.28084; | ||
} | ||
elevation = Math.round(elevation); | ||
} | ||
else { | ||
elevation = calcElevation(elevation); | ||
if (elevation === undefined) { | ||
elevation = ''; | ||
@@ -263,3 +268,3 @@ } | ||
distance, | ||
elevation, | ||
elevation: calcElevation(elevation), | ||
index | ||
@@ -266,0 +271,0 @@ }; |
{ | ||
"name": "altpro", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Elevation profile widget.", | ||
@@ -21,8 +21,8 @@ "author": { | ||
"devDependencies": { | ||
"browserify": "~16", | ||
"browserify": "~17", | ||
"canvas": "~2", | ||
"jsdom": "~13", | ||
"jsdom": "~18", | ||
"jsdom-global": "~3", | ||
"jshint": "~2", | ||
"mocha": "~5", | ||
"mocha": "~9", | ||
"should": "~13" | ||
@@ -29,0 +29,0 @@ }, |
[![NPM version][npm-image]][npm-url] | ||
[![Build Status][travis-image]][travis-url] | ||
[![Dependency Status][deps-image]][deps-url] | ||
[![Dev Dependency Status][deps-dev-image]][deps-dev-url] | ||
@@ -71,7 +69,1 @@ # altpro | ||
[travis-image]: https://img.shields.io/travis/com/pirxpilot/altpro.svg | ||
[deps-image]: https://img.shields.io/david/pirxpilot/altpro.svg | ||
[deps-url]: https://david-dm.org/pirxpilot/altpro | ||
[deps-dev-image]: https://img.shields.io/david/dev/pirxpilot/altpro.svg | ||
[deps-dev-url]: https://david-dm.org/pirxpilot/altpro?type=dev |
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
337
11387
6
69