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

@wildebeest/drag

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wildebeest/drag - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

jest.config.js

11

package.json
{
"name": "@wildebeest/drag",
"version": "0.1.0",
"version": "0.1.1",
"description": "Draging event module",

@@ -8,3 +8,4 @@ "main": "dist/index.js",

"scripts": {
"build": "tsc --declaration"
"build": "tsc --declaration",
"test": "jest"
},

@@ -16,5 +17,9 @@ "repository": {

"dependencies": {
"@wildebeest/common": "^0.1.0"
"@wildebeest/js-modules": "^0.1.0",
"@wildebeest/common": "^0.2.0"
},
"devDependencies": {
"@types/jest": "^24.0.11",
"jest": "^24.7.1",
"ts-jest": "^24.0.2",
"typescript": "^3.4.3"

@@ -21,0 +26,0 @@ },

@@ -5,7 +5,7 @@ import { Emitter } from "@wildebeest/common";

{
protected element: any;
protected element: HTMLElement;
protected emitter: Emitter;
protected mousePosition: any;
protected mousePosition: MouseEvent;
constructor(element: any, emitter: Emitter)
constructor(element: HTMLElement, emitter: Emitter)
{

@@ -15,3 +15,3 @@ this.element = element;

this.element.addEventListener('mousedown', (event: any) => {
this.element.addEventListener('mousedown', (event: MouseEvent) => {
if (event.button != 0) {

@@ -25,3 +25,3 @@ return;

window.addEventListener('mouseup', (event: any) => {
window.addEventListener('mouseup', (event: MouseEvent) => {
if (event.button != 0 || !this.mousePosition) {

@@ -35,3 +35,3 @@ return;

protected onMove(event: any): void
protected onMove(event: MouseEvent): void
{

@@ -43,4 +43,4 @@ if (!this.mousePosition) {

let diff: any = {
'vertical': event.y - this.mousePosition.y,
'horizontal': event.x - this.mousePosition.x
vertical: event.clientY - this.mousePosition.clientY,
horizontal: event.clientX - this.mousePosition.clientX
};

@@ -47,0 +47,0 @@ this.mousePosition = event;

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