Skip to content
This repository was archived by the owner on Dec 26, 2018. It is now read-only.

Commit 5600977

Browse files
committed
update README for 'options' prop.
1 parent 49b5e91 commit 5600977

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ vue-touch supports all Hammer Events ot of the box, just bind a listener to the
6262

6363
You can use the matching `*-options` props to pass Hammer options such as `direction` and `threshold`:
6464

65+
**Example**
6566
``` html
6667
<!-- detect only horizontal pans with a threshold of 100 -->
6768
<v-touch
@@ -99,7 +100,8 @@ const directions = ['up', 'down', 'left', 'right', 'horizontal', 'vertical', 'al
99100

100101
You can enable and disable all or some of the event recognizers via the `enabled` prop:
101102

102-
```
103+
**Example**
104+
```html
103105
<v-touch
104106
<!-- enable all recognizers -->
105107
v-bind:enabled="true"
@@ -113,6 +115,21 @@ You can enable and disable all or some of the event recognizers via the `enabled
113115
></v-touch>
114116
```
115117

118+
#### The 'options' prop
119+
120+
Hammer accepts a few general options that are normally passed when creating a Hammer instance with `new Hammer()` or `new Hammer.Manager()`.
121+
122+
In vue-touch, you can pass those options via the `options` prop:
123+
124+
|Prop|allowed Values|
125+
|----|--------------|
126+
|options| https://hammerjs.github.io/api/#hammer.defaults |
127+
128+
**Example**
129+
```html
130+
<v-touch options="{ touchAction: 'pan' }" />
131+
```
132+
116133

117134
### Public Component Methods
118135

0 commit comments

Comments
 (0)