@wildebeest/drag
Advanced tools
Comparing version
| import { Emitter } from "@wildebeest/common"; | ||
| export declare class DragableElement { | ||
| protected element: any; | ||
| protected element: HTMLElement; | ||
| protected emitter: Emitter; | ||
| protected mousePosition: any; | ||
| constructor(element: any, emitter: Emitter); | ||
| protected onMove(event: any): void; | ||
| protected mousePosition: MouseEvent; | ||
| constructor(element: HTMLElement, emitter: Emitter); | ||
| protected onMove(event: MouseEvent): void; | ||
| getEmitter(): Emitter; | ||
| } |
@@ -30,4 +30,4 @@ "use strict"; | ||
| var diff = { | ||
| 'vertical': event.y - this.mousePosition.y, | ||
| 'horizontal': event.x - this.mousePosition.x | ||
| vertical: event.clientY - this.mousePosition.clientY, | ||
| horizontal: event.clientX - this.mousePosition.clientX | ||
| }; | ||
@@ -34,0 +34,0 @@ this.mousePosition = event; |
| { | ||
| "name": "@wildebeest/drag", | ||
| "version": "0.1.1", | ||
| "version": "0.2.0", | ||
| "description": "Draging event module", | ||
@@ -9,3 +9,4 @@ "main": "dist/index.js", | ||
| "build": "tsc --declaration", | ||
| "test": "jest" | ||
| "test": "jest", | ||
| "deploy": "npm run test && npm run build && git add -A && git commit -m 'deploy' && git push origin master" | ||
| }, | ||
@@ -12,0 +13,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
11591
1.46%