ember-gestures
Advanced tools
Comparing version 0.2.0 to 0.3.0
export default { | ||
include: [], | ||
exclude: [], | ||
ignoreEvents: true, | ||
eventName: 'pan', | ||
options: { direction: Hammer.DIRECTION_VERTICAL }, | ||
recognizer: 'pan' | ||
}; |
@@ -5,5 +5,5 @@ /*global Hammer*/ | ||
exclude: [], | ||
ignoreEvents: true, | ||
eventName: 'swipe', | ||
options: { threshold: 25, direction: Hammer.DIRECTION_VERTICAL }, | ||
recognizer: 'swipe' | ||
}; |
@@ -8,9 +8,9 @@ /*global Hammer*/ | ||
Service, | ||
set: set, | ||
set, | ||
RSVP | ||
} = Ember; | ||
} = Ember; | ||
const { | ||
Promise | ||
} = RSVP; | ||
Promise // jshint ignore:line | ||
} = RSVP; | ||
@@ -27,10 +27,10 @@ export default Service.extend({ | ||
makeRecognizer(name, details) { | ||
const eventName = details.eventName || camelize(name).toLowerCase(); | ||
const gesture = capitalize(details.recognizer); | ||
let eventName = details.includeEvents ? camelize(name).toLowerCase() : details.recognizer; | ||
let gesture = capitalize(details.recognizer); | ||
let options = details.options || {}; | ||
const options = details.options || {}; | ||
options.event = eventName; | ||
let Recognizer = new Hammer[gesture](options); | ||
const Recognizer = new Hammer[gesture](options); | ||
this.registerRecognizer(name, Recognizer); | ||
@@ -59,3 +59,2 @@ if (details.include) { | ||
this.registerRecognizer(name, Recognizer); | ||
return Recognizer; | ||
@@ -62,0 +61,0 @@ |
@@ -1,2 +0,3 @@ | ||
import Gesture from 'ember-gestures/recognizers/tap'; | ||
export default Gesture; | ||
// tap is not configured for double-tap, export single-tap | ||
// if using double-tap | ||
export { default } from 'ember-gestures/recognizers/tap'; |
@@ -1,3 +0,1 @@ | ||
import Ember from 'ember'; | ||
export default { | ||
@@ -4,0 +2,0 @@ include: ['tap'], //an array of recognizers to recognize with. |
@@ -10,3 +10,7 @@ /* jshint node: true */ | ||
app.import('vendor/ember-gestures/dom-guard-begin.js'); | ||
app.import(app.bowerDirectory + '/hammerjs/hammer.min.js'); | ||
if (app.env === "production") { | ||
app.import(app.bowerDirectory + '/hammer.js/hammer.min.js'); | ||
} else { | ||
app.import(app.bowerDirectory + '/hammer.js/hammer.js'); | ||
} | ||
app.import(app.bowerDirectory + '/hammer-time/hammer-time.js'); | ||
@@ -13,0 +17,0 @@ app.import('vendor/ember-gestures/dom-guard-end.js'); |
{ | ||
"name": "ember-gestures", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "TouchAction and Gesture support for Ember Applications", | ||
@@ -46,3 +46,4 @@ "directories": { | ||
"ember-resolver": "^2.0.3", | ||
"ember-try": "0.0.8" | ||
"ember-try": "0.0.8", | ||
"ember-velocity-mixin": "0.3.0" | ||
}, | ||
@@ -49,0 +50,0 @@ "keywords": [ |
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
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
100098
82
0
207
19
1078