react-selectable-fast
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -255,4 +255,4 @@ 'use strict'; | ||
var scrollTop = this.scrollContainer.scrollTop; | ||
var applyContainerScroll = function applyContainerScroll(top, scroll) { | ||
return top + scroll / _this3.props.scale; | ||
var applyContainerScroll = function applyContainerScroll(value, scroll) { | ||
return value + scroll / _this3.props.scale; | ||
}; | ||
@@ -267,12 +267,12 @@ | ||
var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor); | ||
var windowScroll = isChrome ? window.scrollY : document.documentElement.scrollTop; | ||
var windowTopScroll = isChrome ? window.scrollY : document.documentElement.scrollTop; | ||
var windowLeftScroll = isChrome ? window.scrollX : document.documentElement.scrollLeft; | ||
var top = applyContainerScroll(scaledTop - this.scrollBounds.top, scrollTop - windowScroll); | ||
var boxTop = applyContainerScroll(this.mouseDownData.boxTop - this.scrollBounds.top, this.mouseDownData.scrollTop - windowScroll); | ||
var top = applyContainerScroll(scaledTop - this.scrollBounds.top, scrollTop - windowTopScroll); | ||
var boxTop = applyContainerScroll(this.mouseDownData.boxTop - this.scrollBounds.top, this.mouseDownData.scrollTop - windowTopScroll); | ||
var h = boxTop - top; | ||
boxTop = Math.min(boxTop - h, boxTop); | ||
var w = this.mouseDownData.boxLeft - scaledLeft; | ||
var leftContainerRelative = this.mouseDownData.boxLeft - this.scrollBounds.left; | ||
var boxLeft = Math.min(leftContainerRelative - w / this.props.scale, leftContainerRelative / this.props.scale); | ||
var boxLeft = applyContainerScroll(Math.min(leftContainerRelative - w / this.props.scale, leftContainerRelative / this.props.scale), -windowLeftScroll); | ||
@@ -279,0 +279,0 @@ this.updatedSelecting(); |
{ | ||
"name": "react-selectable-fast", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Enable other React components to be selectable by drawing a box with your mouse/touch", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
2752957
2171
4