Skip to content

Instantly share code, notes, and snippets.

@benedikt
Created April 26, 2011 10:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benedikt/942074 to your computer and use it in GitHub Desktop.
Save benedikt/942074 to your computer and use it in GitHub Desktop.
Both are equivalent
Gesticulate.buildGesture('stay-two-up', function(gesture) {
gesture.isHorizontal();
gesture.finger(1).stays();
gesture.finger(2).moves().up().and.doesNotRespectScale();
gesture.finger(3).moves().up().and.doesNotRespectScale();
});
var line = new Gesticulate.Geometry.Line(0, 0, 0, -1);
var opts = { scaleInvariant: true };
var gesture = new Gesticulate.Gesture([
new Gesticulate.Recognizer.Stay(),
new Gesticulate.Recognizer.Stroke(line, opts),
new Gesticulate.Recognizer.Stroke(line, opts)
], { mapping: 'horizontal' });
Gesticulate.registerGesture('stay-two-up', gesture);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment