@nosferatu500/react-dnd-scrollzone
Advanced tools
Comparing version 2.0.2 to 2.0.3
@@ -89,3 +89,2 @@ import React, { createRef, useEffect } from 'react'; | ||
props = __spreadValues(__spreadValues({}, defaultProps), props); | ||
let clearMonitorSubscription = null; | ||
let container = null; | ||
@@ -124,3 +123,3 @@ const wrappedInstance = createRef(); | ||
window.document.body.addEventListener("touchmove", handleEvent); | ||
clearMonitorSubscription = props.dragDropManager.getMonitor().subscribeToStateChange(() => handleMonitorChange()); | ||
let clearMonitorSubscription = props.dragDropManager.getMonitor().subscribeToStateChange(() => handleMonitorChange()); | ||
return () => { | ||
@@ -127,0 +126,0 @@ if (container && typeof container.removeEventListener === "function") { |
@@ -129,3 +129,2 @@ 'use strict'; | ||
props = _extends({}, defaultProps, props); | ||
var clearMonitorSubscription = null; | ||
var container = null; | ||
@@ -138,3 +137,3 @@ var wrappedInstance = react.createRef(); | ||
var dragging = false; | ||
var updateScrolling = throttle__default['default'](function (evt) { | ||
var updateScrolling = throttle__default["default"](function (evt) { | ||
var _container$getBoundin = container.getBoundingClientRect(), | ||
@@ -170,3 +169,3 @@ x = _container$getBoundin.left, | ||
window.document.body.addEventListener('touchmove', handleEvent); | ||
clearMonitorSubscription = props.dragDropManager.getMonitor().subscribeToStateChange(function () { | ||
var clearMonitorSubscription = props.dragDropManager.getMonitor().subscribeToStateChange(function () { | ||
return handleMonitorChange(); | ||
@@ -268,3 +267,3 @@ }); | ||
return hoist__default['default'](ScrollingComponent, WrappedComponent); | ||
return hoist__default["default"](ScrollingComponent, WrappedComponent); | ||
}; | ||
@@ -289,4 +288,4 @@ | ||
exports.createVerticalStrength = createVerticalStrength; | ||
exports['default'] = createScrollingComponentWithConsumer; | ||
exports["default"] = createScrollingComponentWithConsumer; | ||
exports.defaultHorizontalStrength = defaultHorizontalStrength; | ||
exports.defaultVerticalStrength = defaultVerticalStrength; |
{ | ||
"name": "@nosferatu500/react-dnd-scrollzone", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "A cross browser solution to scrolling during drag and drop.", | ||
@@ -19,2 +19,5 @@ "main": "./index.js", | ||
], | ||
"engines": { | ||
"node": ">=14" | ||
}, | ||
"repository": { | ||
@@ -21,0 +24,0 @@ "type": "git", |
Sorry, the diff of this file is not supported yet
33682
692