@@ -24,7 +24,7 @@ You should only use this when you're fine with the default setup, or have set yo
24
24
Just your element, and options. the options will be merged with Hammer.defaults. Also,
25
25
the recognizer set as defined in ` Hammer.defaults.preset ` will be added.
26
26
27
- If you'll pass an empty ` recognizer ` option, no initial recognizers will be added.
27
+ If you pass an empty ` recognizer ` option, no initial recognizers will be added.
28
28
29
29
```` js
30
30
var myElement = document .getElementById (' hitarea' );
@@ -34,7 +34,7 @@ var mc = new Hammer(myElement);
34
34
---
35
35
36
36
## Hammer.defaults
37
- The defaults when creating an instance that are merged being with your options.
37
+ The defaults when creating an instance. They'll be merged with the options that you provide .
38
38
39
39
### touchAction: 'compute'
40
40
Accepts the ` compute ` , ` auto ` , ` pan-y ` , ` pan-x ` and ` none ` values. The default option will choose the
@@ -47,8 +47,8 @@ Let Hammer also fire DOM events. This is a bit slower, so disabled by default. R
47
47
Accepts a boolean, or a function that should return a boolean which is.
48
48
49
49
### cssProps: {....}
50
- A collection of css properties that improve the handling of the input events. For details [ take a look at
51
- the JSDoc. ] ( {{site.baseurl}}/jsdoc/Hammer.defaults.cssProps.html )
50
+ A collection of CSS properties that improve the handling of the input events. For details [ take a look at
51
+ the JSDoc] ( {{site.baseurl}}/jsdoc/Hammer.defaults.cssProps.html ) .
52
52
53
53
### preset: [ ....]
54
54
Default recognizer setup when calling ` Hammer() ` . When creating a new Manager these will be skipped.
@@ -95,7 +95,7 @@ mc.set({ enable: true });
95
95
### get(string), add(Recognizer) and remove(Recognizer)
96
96
Add a new ` Recognizer ` instance to the Manager. The order of adding is also the order of the recognizers being
97
97
executed. Just like the ` get ` method, it returns the added ` Recognizer ` instance.
98
- The ` get ` and ` remove ` methods takes the event name (from a recognizer) or a recognizer instance as an argument.
98
+ The ` get ` and ` remove ` methods take the event name (from a recognizer) or a recognizer instance as an argument.
99
99
100
100
Add and remove also accept an array of recognizers.
101
101
@@ -117,8 +117,9 @@ mc.remove([myPinchRecognizer, 'rotate']);
117
117
````
118
118
119
119
### on(events, handler) and .off(events, [ handler] )
120
- Listen to events triggered by the added recognizers, or remove the binded events. Accepts multiple events seperated
121
- by a space.
120
+
121
+ Listen to events triggered by the added recognizers, or remove the
122
+ bound events. Accepts space-separated list of event names.
122
123
123
124
```` js
124
125
mc .on (" pinch" , function (ev ) {
@@ -151,8 +152,8 @@ Change an option on the recognizer instance. Using this method is recommended,
151
152
because it will update the ` touchAction ` value if needed.
152
153
153
154
### recognizeWith(otherRecognizer) and dropRecognizeWith(otherRecognizer)
154
- Run the recognizer simultaneous with the given other recognizer, in both directions. This is usable for like
155
- combining a pan with a swipe at the end, or a pinch with the ability to rotate the target as well. Dropping the
155
+ Run the recognizer simultaneously with the given other recognizer, in both directions. This could be used to
156
+ combine a pan with a swipe at the end, or a pinch with the ability to rotate the target as well. Dropping the
156
157
connection only removes the link on the recognizer, not on the other recognizer. Both accept an
157
158
array of recognizers.
158
159
@@ -184,7 +185,7 @@ hammertime.on("hammer.input", function(ev) {
184
185
---
185
186
186
187
## Event object
187
- All events that Hammer triggers all receive an event object containing the following properties.
188
+ All events that Hammer triggers receive an event object containing the following properties.
188
189
189
190
| Name | Value |
190
191
| -----------------------| -------|
@@ -215,8 +216,8 @@ All events that Hammer triggers all receive an event object containing the follo
215
216
---
216
217
217
218
## Constants
218
- All constants are defined at the ` Hammer ` object. Since it are binary flags,
219
- you can use bitwise operators on it . MDN has some excellent
219
+ All constants are defined at the ` Hammer ` object. Since they are binary flags,
220
+ you can use bitwise operators on them . MDN has some excellent
220
221
[ documentation] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators )
221
222
about this.
222
223
0 commit comments