API Reference

Class List

pc.TouchDevice

Attach a TouchDevice to an element and it will receive and fire events when the element is touched. See also pc.Touch and pc.TouchEvent

Summary

Methods

attachAttach a device to an element in the DOM.
detachDetach a device from the element it is attached to

Details

Constructor

TouchDevice(element)

Create a new touch device and attach it to an element

Parameters

elementElementThe element to attach listen for events on

Methods

attach(element)

Attach a device to an element in the DOM. If the device is already attached to an element this method will detach it first

Parameters

elementElementThe element to attach to

detach()

Detach a device from the element it is attached to