react-selectable-fast
Advanced tools
Comparing version 0.1.5 to 0.1.6
@@ -451,3 +451,2 @@ 'use strict'; | ||
e = this.desktopEventCoords(e); | ||
if (this.inWhiteList(e.target)) { | ||
@@ -494,3 +493,5 @@ this.mouseDownStarted = false; | ||
document.addEventListener('mousemove', this.openSelectbox); | ||
document.addEventListener('touchmove', this.openSelectbox); | ||
document.addEventListener('mouseup', this.mouseUp); | ||
document.addEventListener('touchend', this.mouseUp); | ||
} | ||
@@ -509,3 +510,3 @@ }, { | ||
key: 'mouseUp', | ||
value: function mouseUp(e) { | ||
value: function mouseUp(event) { | ||
if (this.mouseUpStarted) return; | ||
@@ -517,6 +518,10 @@ | ||
document.removeEventListener('mousemove', this.openSelectbox); | ||
document.removeEventListener('touchmove', this.openSelectbox); | ||
document.removeEventListener('mouseup', this.mouseUp); | ||
document.removeEventListener('touchend', this.mouseUp); | ||
if (!this.mouseDownData) return; | ||
var e = this.desktopEventCoords(event); | ||
var _applyScale3 = this.applyScale(e.pageY, e.pageX); | ||
@@ -543,3 +548,5 @@ | ||
item.setState({ selected: true, selecting: false }); | ||
if (!this.inWhiteList(item.node)) { | ||
item.setState({ selected: true, selecting: false }); | ||
} | ||
} | ||
@@ -618,4 +625,11 @@ } catch (err) { | ||
// Touch-device | ||
e.pageX = e.targetTouches[0].pageX; | ||
e.pageY = e.targetTouches[0].pageY; | ||
if (e.targetTouches[0] !== undefined && e.targetTouches[0].pageX !== undefined) { | ||
// For touchmove | ||
e.pageX = e.targetTouches[0].pageX; | ||
e.pageY = e.targetTouches[0].pageY; | ||
} else if (e.changedTouches[0] !== undefined && e.changedTouches[0].pageX !== undefined) { | ||
// For touchstart | ||
e.pageX = e.changedTouches[0].pageX; | ||
e.pageY = e.changedTouches[0].pageY; | ||
} | ||
} | ||
@@ -622,0 +636,0 @@ return e; |
{ | ||
"name": "react-selectable-fast", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Enable other React components to be selectable by drawing a box with your mouse", | ||
@@ -58,3 +58,7 @@ "repository": { | ||
"dist" | ||
] | ||
], | ||
"homepage": "https://github.com/valerybugakov/react-selectable-fast#readme", | ||
"directories": { | ||
"example": "example" | ||
} | ||
} |
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
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
3853469
7335
2