Skip to content

Files

Latest commit

eca61fe · Apr 4, 2018

History

History
This branch is 199 commits behind Shopify/draggable:main.

TouchSensor

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Apr 4, 2018
Oct 31, 2017
Apr 4, 2018
Oct 6, 2017

Touch Sensor

Draggable uses this sensor by default

Picks up browser touch events and triggers the events below on a source container.

  • drag:start
  • drag:move
  • drag:stop

API

new TouchSensor(containers: HTMLElement[]|NodeList|HTMLElement, options: Object): TouchSensor
To create a touch sensor, specify the containers it should pay attention to. Sensors will always trigger sensor events on container element.

touchSensor.attach(): void
Attaches sensors to the DOM

touchSensor.detach(): void
Detaches sensors to the DOM

Options

delay {Number}
This value will delay touch start