You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

altpro

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

altpro - npm Package Compare versions

Comparing version

to
1.0.1

7

History.md
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 @@ ==================

9

lib/altpro.js

@@ -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": {