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

@hscmap/inertial-mouse

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hscmap/inertial-mouse - npm Package Compare versions

Comparing version 3.4.0 to 3.5.0

6

lib/SinglePointEvent.d.ts

@@ -11,5 +11,5 @@ import { V2 } from "./v2";

readonly clientCoord: V2;
static onStart(target: HTMLElement | Document, cb: (e: SinglePointEvent) => void): () => void;
static onMove(target: HTMLElement | Document, cb: (e: SinglePointEvent) => void): () => void;
static onEnd(target: HTMLElement | Document, cb: (e: SinglePointEvent) => void): () => void;
static onStart(target: HTMLElement | Document, cb: (e: SinglePointEvent) => void, useCapture?: boolean): () => void;
static onMove(target: HTMLElement | Document, cb: (e: SinglePointEvent) => void, useCapture?: boolean): () => void;
static onEnd(target: HTMLElement | Document, cb: (e: SinglePointEvent) => void, useCapture?: boolean): () => void;
originalEvent({ mouse, touch }: Partial<{

@@ -16,0 +16,0 @@ mouse: (e: MouseEvent) => void;

@@ -45,3 +45,4 @@ "use strict";

});
SinglePointEvent.onStart = function (target, cb) {
SinglePointEvent.onStart = function (target, cb, useCapture) {
if (useCapture === void 0) { useCapture = false; }
var mouse = function (e) {

@@ -55,10 +56,11 @@ cb(new SinglePointEvent(e));

};
target.addEventListener('mousedown', mouse);
target.addEventListener('touchstart', touch);
target.addEventListener('mousedown', mouse, useCapture);
target.addEventListener('touchstart', touch, useCapture);
return function () {
target.removeEventListener('mousedown', mouse);
target.removeEventListener('touchstart', touch);
target.removeEventListener('mousedown', mouse, useCapture);
target.removeEventListener('touchstart', touch, useCapture);
};
};
SinglePointEvent.onMove = function (target, cb) {
SinglePointEvent.onMove = function (target, cb, useCapture) {
if (useCapture === void 0) { useCapture = false; }
var mouse = function (e) {

@@ -70,10 +72,11 @@ cb(new SinglePointEvent(e));

};
target.addEventListener('mousemove', mouse);
target.addEventListener('touchmove', touch);
target.addEventListener('mousemove', mouse, useCapture);
target.addEventListener('touchmove', touch, useCapture);
return function () {
target.removeEventListener('mousemove', mouse);
target.removeEventListener('touchend', touch);
target.removeEventListener('mousemove', mouse, useCapture);
target.removeEventListener('touchend', touch, useCapture);
};
};
SinglePointEvent.onEnd = function (target, cb) {
SinglePointEvent.onEnd = function (target, cb, useCapture) {
if (useCapture === void 0) { useCapture = false; }
var mouse = function (e) {

@@ -86,7 +89,7 @@ cb(new SinglePointEvent(e));

};
target.addEventListener('mouseup', mouse);
target.addEventListener('touchend', touch);
target.addEventListener('mouseup', mouse, useCapture);
target.addEventListener('touchend', touch, useCapture);
return function () {
target.removeEventListener('mouseup', mouse);
target.removeEventListener('touchend', touch);
target.removeEventListener('mouseup', mouse, useCapture);
target.removeEventListener('touchend', touch, useCapture);
};

@@ -93,0 +96,0 @@ };

{
"name": "@hscmap/inertial-mouse",
"version": "3.4.0",
"version": "3.5.0",
"main": "./lib/index.js",

@@ -8,3 +8,3 @@ "types": "./lib/index.d.ts",

"prepare": "tsc",
"example-server": "webpack-dev-server --context example --config ./example/webpack.config.js --mode development --host 0.0.0.0",
"example-server": "webpack-dev-server --context example --config ./example/webpack.config.js --mode development --host 0.0.0.0 --disableHostCheck",
"example": "webpack --context example --config ./example/webpack.config.js --mode development"

@@ -11,0 +11,0 @@ },

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