jtangelder / faketouches.js

Library to send fake touchevents. Used for testing Hammer.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

faketouches.js

Library to send fake touchevents. Used for testing Hammer.js 1.x.

Its successor is available here: https://github.com/hammerjs/simulator

Usage

Fake a tap on the screen

var faker = new FakeTouches(element);
faker.setTouchType(FakeTouches.POINTER_TOUCH_EVENTS);

faker.setTouches([[100,100]]);
faker.triggerStart();
faker.triggerEnd();

Fake a gesture

faker.triggerGesture('Drag', function(){ 
	//callback
})

About

Library to send fake touchevents. Used for testing Hammer.js

License:MIT License


Languages

Language:JavaScript 100.0%