Socket
Socket
Sign inDemoInstall

@composi/gestures

Package Overview
Dependencies
0
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.4 to 1.0.5

5

package.json
{
"name": "@composi/gestures",
"version": "1.0.4",
"version": "1.0.5",
"description": "Cross-platform gesture library for desktop and mobile.",
"main": "index.js",
"main": "dist/gestures.js",
"jsnext:main": "./index.js",
"module": "dist/gestures.mjs",
"files": [
"index.js",
"src",

@@ -11,0 +10,0 @@ "dist"

18

src/gestures.js

@@ -53,4 +53,5 @@ /**

* @param {*} [data]
* @param {Event} originalEvent
*/
export function trigger(el, event, data) {
export function trigger(el, event, data, originalEvent) {
if (!event) {

@@ -65,2 +66,3 @@ console.error('No event was provided. You do need to provide one.')

evtObj['data'] = data
evtObj['originalEvent'] = originalEvent
el.dispatchEvent(evtObj)

@@ -108,3 +110,3 @@ }

function longTap() {
function longTap(event) {
longTapTimeout = null

@@ -114,3 +116,3 @@ if (touch.last) {

if (touch && touch.el) {
trigger(touch.el, 'longtap')
trigger(touch.el, 'longtap', null, event)
touch = {}

@@ -177,3 +179,3 @@ }

touch.last = now
longTapTimeout = setTimeout(longTap, longTapDelay)
longTapTimeout = setTimeout(longTap, longTapDelay, e)
})

@@ -224,4 +226,4 @@

)
trigger(touch.el, 'swipe', direction)
trigger(touch.el, 'swipe' + direction)
trigger(touch.el, 'swipe', direction, e)
trigger(touch.el, 'swipe' + direction, null, e)
touch = {}

@@ -244,3 +246,3 @@ }

if (touch && touch.el) {
trigger(touch.el, 'dbltap')
trigger(touch.el, 'dbltap', null, e)
e.preventDefault()

@@ -256,3 +258,3 @@ touch = {}

if (touch && touch.el && !touch.move) {
trigger(touch.el, 'tap')
trigger(touch.el, 'tap', null, e)
touch = {}

@@ -259,0 +261,0 @@ } else {

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc