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.5 to 0.3.6

21

dist/Touch.js

@@ -44,3 +44,3 @@ /**

var supportsPassive = function () {
//simular to jQuery's test
// simular to jQuery's test
var supported = false;

@@ -76,3 +76,4 @@ try {

move: 'mousemove',
end: 'mouseup'
end: 'mouseup',
contextmenu: 'contextmenu'
},

@@ -110,2 +111,3 @@ touch: {

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

@@ -159,2 +161,6 @@ this.delayMouseStart = options.delayMouseStart;

if (this.enableMouseEvents) {
this.addEventListener(window, 'contextmenu', this.handleTopMoveEndCapture);
}
if (this.enableKeyboardEvents) {

@@ -180,2 +186,6 @@ this.addEventListener(window, 'keydown', this.handleCancelOnEscape, true);

if (this.enableMouseEvents) {
this.removeEventListener(window, 'contextmenu', this.handleTopMoveEndCapture);
}
if (this.enableKeyboardEvents) {

@@ -396,3 +406,3 @@ this.removeEventListener(window, 'keydown', this.handleCancelOnEscape, true);

value: function handleCancelOnEscape(e) {
if (e.key === "Escape") {
if (e.key === 'Escape') {
this._mouseClientOffset = {};

@@ -405,2 +415,7 @@

}, {
key: 'handleOnContextMenu',
value: function handleOnContextMenu() {
this.moveStartSourceIds = null;
}
}, {
key: 'installSourceNodeRemovalObserver',

@@ -407,0 +422,0 @@ value: function installSourceNodeRemovalObserver(node) {

2

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

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

@@ -27,3 +27,3 @@ /**

const supportsPassive = (() => {
//simular to jQuery's test
// simular to jQuery's test
let supported = false;

@@ -55,3 +55,4 @@ try {

move: 'mousemove',
end: 'mouseup'
end: 'mouseup',
contextmenu: 'contextmenu'
},

@@ -64,3 +65,3 @@ touch: {

keyboard: {
keydown: 'keydown',
keydown: 'keydown'
}

@@ -87,2 +88,3 @@ };

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

@@ -134,2 +136,6 @@ this.delayMouseStart = options.delayMouseStart;

if (this.enableMouseEvents) {
this.addEventListener(window, 'contextmenu', this.handleTopMoveEndCapture);
}
if (this.enableKeyboardEvents){

@@ -154,2 +160,6 @@ this.addEventListener(window, 'keydown', this.handleCancelOnEscape, true);

if (this.enableMouseEvents) {
this.removeEventListener(window, 'contextmenu', this.handleTopMoveEndCapture);
}
if (this.enableKeyboardEvents){

@@ -358,10 +368,14 @@ this.removeEventListener(window, 'keydown', this.handleCancelOnEscape, true);

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

@@ -368,0 +382,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