| OLD | NEW |
| 1 /** | 1 /** |
| 2 * @license | 2 * @license |
| 3 * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. | 3 * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. |
| 4 * This code may only be used under the BSD style license found at http://polyme
r.github.io/LICENSE.txt | 4 * This code may only be used under the BSD style license found at http://polyme
r.github.io/LICENSE.txt |
| 5 * The complete set of authors may be found at http://polymer.github.io/AUTHORS.
txt | 5 * The complete set of authors may be found at http://polymer.github.io/AUTHORS.
txt |
| 6 * The complete set of contributors may be found at http://polymer.github.io/CON
TRIBUTORS.txt | 6 * The complete set of contributors may be found at http://polymer.github.io/CON
TRIBUTORS.txt |
| 7 * Code distributed by Google as part of the polymer project is also | 7 * Code distributed by Google as part of the polymer project is also |
| 8 * subject to an additional IP rights grant found at http://polymer.github.io/PA
TENTS.txt | 8 * subject to an additional IP rights grant found at http://polymer.github.io/PA
TENTS.txt |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 y: toXY.y | 77 y: toXY.y |
| 78 }, node); | 78 }, node); |
| 79 } | 79 } |
| 80 | 80 |
| 81 function up(node, xy) { | 81 function up(node, xy) { |
| 82 xy = xy || middleOfNode(node); | 82 xy = xy || middleOfNode(node); |
| 83 makeEvent('up', xy, node); | 83 makeEvent('up', xy, node); |
| 84 } | 84 } |
| 85 | 85 |
| 86 function tap(node) { | 86 function tap(node) { |
| 87 // Respect nodes that are disabled in the UI. |
| 88 if (window.getComputedStyle(node)['pointer-events'] === 'none') |
| 89 return; |
| 87 var xy = middleOfNode(node); | 90 var xy = middleOfNode(node); |
| 88 down(node, xy); | 91 down(node, xy); |
| 89 up(node, xy); | 92 up(node, xy); |
| 90 makeEvent('tap', xy, node); | 93 makeEvent('tap', xy, node); |
| 91 } | 94 } |
| 92 | 95 |
| 93 function focus(target) { | 96 function focus(target) { |
| 94 Polymer.Base.fire.call(target, 'focus', {}, { | 97 Polymer.Base.fire.call(target, 'focus', {}, { |
| 95 bubbles: false | 98 bubbles: false |
| 96 }); | 99 }); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 track: track, | 175 track: track, |
| 173 pressAndReleaseKeyOn: pressAndReleaseKeyOn, | 176 pressAndReleaseKeyOn: pressAndReleaseKeyOn, |
| 174 pressEnter: pressEnter, | 177 pressEnter: pressEnter, |
| 175 pressSpace: pressSpace, | 178 pressSpace: pressSpace, |
| 176 keyDownOn: keyDownOn, | 179 keyDownOn: keyDownOn, |
| 177 keyUpOn: keyUpOn, | 180 keyUpOn: keyUpOn, |
| 178 middleOfNode: middleOfNode, | 181 middleOfNode: middleOfNode, |
| 179 topLeftOfNode: topLeftOfNode | 182 topLeftOfNode: topLeftOfNode |
| 180 }; | 183 }; |
| 181 })(this); | 184 })(this); |
| OLD | NEW |