rc-virtual-list
Advanced tools
Comparing version 3.14.2 to 3.14.3
@@ -219,4 +219,4 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
setSize({ | ||
width: sizeInfo.width || sizeInfo.offsetWidth, | ||
height: sizeInfo.height || sizeInfo.offsetHeight | ||
width: sizeInfo.offsetWidth, | ||
height: sizeInfo.offsetHeight | ||
}); | ||
@@ -223,0 +223,0 @@ }; |
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; | ||
import * as React from 'react'; | ||
import classNames from 'classnames'; | ||
import raf from "rc-util/es/raf"; | ||
import * as React from 'react'; | ||
function getPageXY(e, horizontal) { | ||
@@ -130,4 +130,5 @@ var obj = 'touches' in e ? e.touches[0] : e; | ||
raf.cancel(moveRafId); | ||
var scale = containerSize / scrollbarRef.current.getBoundingClientRect().height; | ||
if (stateDragging) { | ||
var offset = getPageXY(e, horizontal) - statePageY; | ||
var offset = (getPageXY(e, horizontal) - statePageY) * scale; | ||
var newTop = stateStartTop; | ||
@@ -134,0 +135,0 @@ if (!isLTR && horizontal) { |
@@ -228,4 +228,4 @@ "use strict"; | ||
setSize({ | ||
width: sizeInfo.width || sizeInfo.offsetWidth, | ||
height: sizeInfo.height || sizeInfo.offsetHeight | ||
width: sizeInfo.offsetWidth, | ||
height: sizeInfo.offsetHeight | ||
}); | ||
@@ -232,0 +232,0 @@ }; |
@@ -12,5 +12,5 @@ "use strict"; | ||
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _classnames = _interopRequireDefault(require("classnames")); | ||
var _raf = _interopRequireDefault(require("rc-util/lib/raf")); | ||
var React = _interopRequireWildcard(require("react")); | ||
function getPageXY(e, horizontal) { | ||
@@ -139,4 +139,5 @@ var obj = 'touches' in e ? e.touches[0] : e; | ||
_raf.default.cancel(moveRafId); | ||
var scale = containerSize / scrollbarRef.current.getBoundingClientRect().height; | ||
if (stateDragging) { | ||
var offset = getPageXY(e, horizontal) - statePageY; | ||
var offset = (getPageXY(e, horizontal) - statePageY) * scale; | ||
var newTop = stateStartTop; | ||
@@ -143,0 +144,0 @@ if (!isLTR && horizontal) { |
{ | ||
"name": "rc-virtual-list", | ||
"version": "3.14.2", | ||
"version": "3.14.3", | ||
"description": "React Virtual List Component", | ||
@@ -5,0 +5,0 @@ "engines": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
133652
3281