Comparing version 1.0.0 to 1.0.1
1.0.1 / 2019-02-28 | ||
================== | ||
* support clearing current selection | ||
* send event altpro-select when selection is cleared on mouseleave | ||
* fix mouseleave handler (clear selected elevation) | ||
1.0.0 / 2019-02-09 | ||
@@ -3,0 +10,0 @@ ================== |
@@ -167,3 +167,3 @@ const findSegment = require('./find-segment'); | ||
fg.addEventListener('mousemove', onmousemove); | ||
fg.removeEventListener('mouseleve', onmouseleave); | ||
fg.addEventListener('mouseleave', onmouseleave); | ||
@@ -194,3 +194,3 @@ let selectedIndex = -1; // nothing selected | ||
fg.removeEventListener('mousemove', onmousemove); | ||
fg.removeEventListener('mouseleve', onmouseleave); | ||
fg.removeEventListener('mouseleave', onmouseleave); | ||
parent.innerHTML = ''; | ||
@@ -211,2 +211,3 @@ } | ||
clear(fgCtx, { w, h }, dpr); | ||
parent.dispatchEvent(new CustomEvent('altpro-select', {})); | ||
} | ||
@@ -223,4 +224,6 @@ | ||
function select(index) { | ||
function select(index = -1) { | ||
if (index < 1 || index >= items.length) { | ||
label.hidden = true; | ||
clear(fgCtx, { w, h }, dpr); | ||
return; | ||
@@ -227,0 +230,0 @@ } |
{ | ||
"name": "altpro", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Elevation profile widget.", | ||
@@ -5,0 +5,0 @@ "author": { |
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
12446
333