| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 'use strict'; | 5 'use strict'; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * A class that listens for touch events and produces events when these | 8 * A class that listens for touch events and produces events when these |
| 9 * touches form gestures (e.g. pinching). | 9 * touches form gestures (e.g. pinching). |
| 10 */ | 10 */ |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 * @return {!Object} Midpoint between touch[0] and touch[1]. | 181 * @return {!Object} Midpoint between touch[0] and touch[1]. |
| 182 */ | 182 */ |
| 183 static center_(event) { | 183 static center_(event) { |
| 184 let touch1 = event.touches[0]; | 184 let touch1 = event.touches[0]; |
| 185 let touch2 = event.touches[1]; | 185 let touch2 = event.touches[1]; |
| 186 return { | 186 return { |
| 187 x: (touch1.clientX + touch2.clientX) / 2, | 187 x: (touch1.clientX + touch2.clientX) / 2, |
| 188 y: (touch1.clientY + touch2.clientY) / 2 | 188 y: (touch1.clientY + touch2.clientY) / 2 |
| 189 }; | 189 }; |
| 190 } | 190 } |
| 191 }; | 191 } |
| OLD | NEW |