You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 26, 2018. It is now read-only.
You can enable and disable all or some of the event recognizers via the `enabled` prop:
101
+
102
+
```
103
+
<v-touch
104
+
<!-- enable all recognizers -->
105
+
v-bind:enabled="true"
106
+
107
+
<!-- disable all recognizers -->
108
+
v-bind:enabled="true"
109
+
110
+
<!-- pass an object to enable and disable recognizers individually -->
111
+
v-bind:enabled="{ pinch: true, rotate: false }"
112
+
113
+
></v-touch>
114
+
```
115
+
116
+
117
+
### Public Component Methods
92
118
93
-
The component exposes a few convenience methods to enable and disable Recognizers:
119
+
The component exposes a few convenience methods to enable and disable Recognizers, and check if a recognizer is enabled:
94
120
95
121
|Method|Explanation|
96
122
|------|-----------|
97
-
|`disable(event)`|disable the Recognizer for `event`|
98
-
|`enable(event)`|disable the Recognizer for `event`|
99
-
|`disableAll`|disable all Recognizers|
100
-
|`enableAll`|enable all Recognizers|
123
+
|`disable(event)`|disable event's recognizer|
124
+
|`enable(event)`|disable event's recognizer|
125
+
|`toggle(event)`|Toogle the 'enable' state of event's recognizer|
126
+
|`disableAll()`|disable all Recognizers|
127
+
|`enableAll()`|enable all Recognizers|
101
128
|`isEnabled(event)`|returns `true` if Recognizer for `event` is currently enabled|
102
129
103
130
```html
@@ -168,9 +195,9 @@ alias: {
168
195
}
169
196
```
170
197
171
-
Once is issue has been resolved HammerJS, this alias is no longer nessessary and can be removed.
198
+
Once this issue has been resolved HammerJS, this alias is no longer nessessary and can be removed.
172
199
173
-
The `<v-touch>` component itself will never try to setup any Hamer Manangers or Recognizers if it detects that it is running in an SSR environment (seeVue.js API docs for [vm.$isServer](https://vuejs.org/v2/api/#vm-isServer)), so this will not lead to any errors. `<v-touch>` will only render a normal `<div>` element (or whatever element you defined with the `tag` prop).
200
+
The `<v-touch>` component itself will never try to setup any Hamer Manangers or Recognizers if it detects that it is running in an SSR environment (seeVue.js API docs for [vm.$isServer](https://vuejs.org/v2/api/#vm-isServer)). The component will only render a normal `<div>` element (or whatever element you defined with the `tag` prop).
0 commit comments