Move some touch logic to the handler base class.

This commit is contained in:
Xavier Mamano
2012-02-15 17:55:37 +01:00
parent cd41548c01
commit ee8e892bb4
9 changed files with 130 additions and 111 deletions

View File

@@ -294,7 +294,7 @@
// "touchend" events set expected states in the drag handler.
// We also verify that we stop event bubbling as appropriate.
t.plan(14);
t.plan(19);
// set up
@@ -324,6 +324,11 @@
t.eq(h.start.y, 0, '[touchstart] start.y is correct');
t.eq(log.length, 1, '[touchstart] one item in log');
t.ok(log[0] === e, "touchstart", '[touchstart] event is stopped');
t.eq(m.events.listeners.mousedown.length, 0,"mousedown is not registered");
t.eq(m.events.listeners.mouseup.length, 0,"mouseup is not registered");
t.eq(m.events.listeners.mousemove.length, 0,"mousemove is not registered");
t.eq(m.events.listeners.click.length, 0,"click is not registered");
t.eq(m.events.listeners.mouseout.length, 0,"mouseout is not registered");
e = {xy: new Px(1, 1)};
m.events.triggerEvent('touchmove', e);