Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

svelte-gestures

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-gestures - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

5

CHANGELOG.md
# Changelog
## 1.3.1
Removing move listener when user leave active element.
When the move capture on active element is lost, `activeEvents` are set to [] and `up` event is triggered.
## 1.3.0

@@ -4,0 +9,0 @@

17

dist/index.esm.js

@@ -57,5 +57,3 @@ const DEFAULT_DELAY = 300;

if (!activeEvents.length) {
removePointermoveHandler();
removeLostpointercaptureHandler();
removepointerupHandler();
removeEventHandlers();
}

@@ -68,2 +66,9 @@

function removeEventHandlers() {
removePointermoveHandler();
removeLostpointercaptureHandler();
removepointerupHandler();
removepointerleaveHandler();
}
const removePointermoveHandler = addEventListener(node, 'pointermove', e => {

@@ -82,2 +87,8 @@ activeEvents = activeEvents.map(activeEvent => {

});
const removepointerleaveHandler = addEventListener(node, 'pointerleave', e => {
activeEvents = [];
removeEventHandlers();
dispatch(node, gestureName, e, activeEvents, 'up');
onUpCallback?.(activeEvents, e);
});
}

@@ -84,0 +95,0 @@

@@ -61,5 +61,3 @@ 'use strict';

if (!activeEvents.length) {
removePointermoveHandler();
removeLostpointercaptureHandler();
removepointerupHandler();
removeEventHandlers();
}

@@ -72,2 +70,9 @@

function removeEventHandlers() {
removePointermoveHandler();
removeLostpointercaptureHandler();
removepointerupHandler();
removepointerleaveHandler();
}
const removePointermoveHandler = addEventListener(node, 'pointermove', e => {

@@ -86,2 +91,8 @@ activeEvents = activeEvents.map(activeEvent => {

});
const removepointerleaveHandler = addEventListener(node, 'pointerleave', e => {
activeEvents = [];
removeEventHandlers();
dispatch(node, gestureName, e, activeEvents, 'up');
onUpCallback?.(activeEvents, e);
});
}

@@ -88,0 +99,0 @@

2

package.json

@@ -6,3 +6,3 @@ {

"license": "MIT",
"version": "1.3.0",
"version": "1.3.1",
"main": "dist/index.js",

@@ -9,0 +9,0 @@ "module": "dist/index.esm.js",

@@ -5,4 +5,8 @@ # svelte-gestures

It contains the most popular gestures: `pan`, `pinch`, `rotate`, `swipe`, `tap`. It also exposes generic event handling core, which can be extended for your own specific gesture implementation (see sourcecode how gestures are implemented).
## installation
`npm install svelte-gestures`
It contains the most popular gestures: `pan`, `pinch`, `press`, `rotate`, `swipe`, `tap`. It also exposes generic event handling core, which can be extended for your own specific gesture implementation (see sourcecode how gestures are implemented).
It uses pointer events under the hood, to make it really cross platform. Gestures will be recognized, if done by mouse, touche, stylus etc.

@@ -9,0 +13,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc