Comparing version 0.2.1 to 0.3.0
12
index.js
@@ -60,3 +60,3 @@ /* jshint node: true */ | ||
end: (opts || {}).end || target | ||
}, log, target); | ||
}, log, opts); | ||
@@ -66,3 +66,3 @@ return log; | ||
function bindTouch(targets, log) { | ||
function bindTouch(targets, log, opts) { | ||
// add the appropriate listeners | ||
@@ -88,4 +88,5 @@ targets.start.addEventListener('touchstart', function(evt) { | ||
function bindMouse(targets, log) { | ||
function bindMouse(targets, log, opts) { | ||
var isDown = false; | ||
var captureOver = (opts || {}).over; | ||
@@ -98,7 +99,8 @@ targets.start.addEventListener('mousedown', function(evt) { | ||
targets.move.addEventListener('mousemove', function(evt) { | ||
if (! isDown) { | ||
var eventType = isDown ? 'move' : 'over'; | ||
if (eventType === 'over' && (! captureOver)) { | ||
return; | ||
} | ||
log([ evt.pageX, evt.pageY, { type: 'move' } ]); | ||
log([ evt.pageX, evt.pageY, { type: eventType } ]); | ||
}); | ||
@@ -105,0 +107,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"author": "Damon Oehlman <damon.oehlman@gmail.com>", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"dependencies": { | ||
@@ -14,6 +14,6 @@ "feature": "~0.1.2", | ||
"type": "git", | ||
"url": "https://bitbucket.org/DamonOehlman/point.git" | ||
"url": "https://github.com/DamonOehlman/point.git" | ||
}, | ||
"bugs": { | ||
"url": "https://bitbucket.org/DamonOehlman/point/issues" | ||
"url": "https://github.com/DamonOehlman/point/issues" | ||
}, | ||
@@ -32,3 +32,4 @@ "scripts": { | ||
], | ||
"license": "MIT" | ||
} | ||
"license": "MIT", | ||
"homepage": "https://github.com/DamonOehlman/point" | ||
} |
@@ -51,3 +51,3 @@ # point | ||
Copyright (c) 2013 Damon Oehlman <damon.oehlman@gmail.com> | ||
Copyright (c) 2014 Damon Oehlman <damon.oehlman@gmail.com> | ||
@@ -54,0 +54,0 @@ Permission is hereby granted, free of charge, to any person obtaining |
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 bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
5459
7
93
1
1