Comparing version 0.1.0 to 0.1.1
16
index.js
@@ -16,3 +16,5 @@ var Stream = require('stream'), | ||
opts = options || {}, | ||
target = opts.target || node, | ||
startTarget = opts.start || node, | ||
moveTarget = opts.move || node, | ||
endTarget = opts.end || node, | ||
isDown = false; | ||
@@ -31,11 +33,11 @@ | ||
// add the appropriate listeners | ||
node.addEventListener('touchstart', function(evt) { | ||
startTarget.addEventListener('touchstart', function(evt) { | ||
data('start', evt.changedTouches, evt); | ||
}); | ||
node.addEventListener('touchmove', function(evt) { | ||
moveTarget.addEventListener('touchmove', function(evt) { | ||
data('move', evt.targetTouches, evt); | ||
}); | ||
node.addEventListener('touchend', function(evt) { | ||
endTarget.addEventListener('touchend', function(evt) { | ||
data('end', evt.changedTouches, evt); | ||
@@ -46,3 +48,3 @@ }); | ||
else { | ||
node.addEventListener('mousedown', function(evt) { | ||
startTarget.addEventListener('mousedown', function(evt) { | ||
isDown = isDown || (evt.button === 0); | ||
@@ -53,3 +55,3 @@ data( | ||
node.addEventListener('mousemove', function(evt) { | ||
moveTarget.addEventListener('mousemove', function(evt) { | ||
if (isDown) { | ||
@@ -60,3 +62,3 @@ data('move', fakeTouch(evt), evt); | ||
node.addEventListener('mouseup', function(evt) { | ||
endTarget.addEventListener('mouseup', function(evt) { | ||
data('end', fakeTouch(evt), evt); | ||
@@ -63,0 +65,0 @@ }); |
@@ -11,3 +11,3 @@ { | ||
], | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"dependencies": { | ||
@@ -14,0 +14,0 @@ "feature": "0.0.x" |
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 README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
4259
6
78
1
45