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

react-dnd-touch-backend

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-dnd-touch-backend - npm Package Compare versions

Comparing version 0.3.4 to 0.3.5

28

dist/Touch.js

@@ -81,2 +81,5 @@ /**

end: 'touchend'
},
keyboard: {
keydown: 'keydown'
}

@@ -96,2 +99,3 @@ };

enableMouseEvents: false,
enableKeyboardEvents: false,
delayTouchStart: 0,

@@ -105,2 +109,3 @@ delayMouseStart: 0

this.enableKeyboardEvents = options.enableKeyboardEvents;
this.delayTouchStart = options.delayTouchStart;

@@ -124,2 +129,6 @@ this.delayMouseStart = options.delayMouseStart;

if (options.enableKeyboardEvents) {
this.listenerTypes.push('keyboard');
}
this.getSourceClientOffset = this.getSourceClientOffset.bind(this);

@@ -132,2 +141,3 @@ this.handleTopMoveStart = this.handleTopMoveStart.bind(this);

this.handleTopMoveEndCapture = this.handleTopMoveEndCapture.bind(this);
this.handleCancelOnEscape = this.handleCancelOnEscape.bind(this);
}

@@ -150,2 +160,6 @@

this.addEventListener(window, 'end', this.handleTopMoveEndCapture, true);
if (this.enableKeyboardEvents) {
this.addEventListener(window, 'keydown', this.handleCancelOnEscape, true);
}
}

@@ -168,2 +182,6 @@ }, {

if (this.enableKeyboardEvents) {
this.removeEventListener(window, 'keydown', this.handleCancelOnEscape, true);
}
this.uninstallSourceNodeRemovalObserver();

@@ -378,2 +396,12 @@ }

}, {
key: 'handleCancelOnEscape',
value: function handleCancelOnEscape(e) {
if (e.key === "Escape") {
this._mouseClientOffset = {};
this.uninstallSourceNodeRemovalObserver();
this.actions.endDrag();
}
}
}, {
key: 'installSourceNodeRemovalObserver',

@@ -380,0 +408,0 @@ value: function installSourceNodeRemovalObserver(node) {

2

package.json
{
"name": "react-dnd-touch-backend",
"version": "0.3.4",
"version": "0.3.5",
"description": "Touch backend for react-dnd",

@@ -5,0 +5,0 @@ "main": "dist/Touch.js",

@@ -60,2 +60,5 @@ /**

end: 'touchend'
},
keyboard: {
keydown: 'keydown',
}

@@ -71,2 +74,3 @@ };

enableMouseEvents: false,
enableKeyboardEvents: false,
delayTouchStart: 0,

@@ -81,2 +85,3 @@ delayMouseStart: 0,

this.enableKeyboardEvents = options.enableKeyboardEvents;
this.delayTouchStart = options.delayTouchStart;

@@ -100,2 +105,6 @@ this.delayMouseStart = options.delayMouseStart;

if (options.enableKeyboardEvents) {
this.listenerTypes.push('keyboard')
}
this.getSourceClientOffset = this.getSourceClientOffset.bind(this);

@@ -108,2 +117,3 @@ this.handleTopMoveStart = this.handleTopMoveStart.bind(this);

this.handleTopMoveEndCapture = this.handleTopMoveEndCapture.bind(this);
this.handleCancelOnEscape = this.handleCancelOnEscape.bind(this);
}

@@ -119,7 +129,11 @@

this.addEventListener(window, 'start', this.getTopMoveStartHandler());
this.addEventListener(window, 'start', this.handleTopMoveStartCapture, true);
this.addEventListener(window, 'move', this.handleTopMove);
this.addEventListener(window, 'move', this.handleTopMoveCapture, true);
this.addEventListener(window, 'end', this.handleTopMoveEndCapture, true);
this.addEventListener(window, 'start', this.getTopMoveStartHandler());
this.addEventListener(window, 'start', this.handleTopMoveStartCapture, true);
this.addEventListener(window, 'move', this.handleTopMove);
this.addEventListener(window, 'move', this.handleTopMoveCapture, true);
this.addEventListener(window, 'end', this.handleTopMoveEndCapture, true);
if (this.enableKeyboardEvents){
this.addEventListener(window, 'keydown', this.handleCancelOnEscape, true);
}
}

@@ -141,2 +155,6 @@

if (this.enableKeyboardEvents){
this.removeEventListener(window, 'keydown', this.handleCancelOnEscape, true);
}
this.uninstallSourceNodeRemovalObserver();

@@ -340,2 +358,11 @@ }

handleCancelOnEscape (e) {
if (e.key === "Escape"){
this._mouseClientOffset = {};
this.uninstallSourceNodeRemovalObserver();
this.actions.endDrag();
}
}
installSourceNodeRemovalObserver (node) {

@@ -342,0 +369,0 @@ this.uninstallSourceNodeRemovalObserver();

Sorry, the diff of this file is too big to display

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