Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.8 gestures in core #1486

Merged
merged 1 commit into from
May 6, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions polymer.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

<link rel="import" href="src/standard/annotations.html">
<link rel="import" href="src/standard/events.html">
<link rel="import" href="src/standard/gestures.html">
<link rel="import" href="src/standard/utils.html">
<link rel="import" href="src/standard/effects.html">
<link rel="import" href="src/standard/configure.html">
Expand Down
284 changes: 0 additions & 284 deletions src/lib/gestures.html

This file was deleted.

37 changes: 10 additions & 27 deletions src/standard/events.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,26 @@
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->

<link rel="import" href="../lib/gestures.html">

<script>

/**
* Supports `listeners` and `keyPresses` objects.
* Supports `listeners` object.
*
* Example:
*
* using('Base', function(Base) {
*
* Polymer({
*
* listeners: {
* // `click` events on the host are delegated to `clickHandler`
* 'click': 'clickHandler'
* },
*
* keyPresses: {
* // 'ESC' key presses are delegated to `escHandler`
* Base.ESC_KEY: 'escHandler'
* },
* Polymer({
*
* ...
* listeners: {
* // `click` events on the host are delegated to `clickHandler`
* 'click': 'clickHandler'
* },
*
* });
* ...
*
* });
*
*
* @class standard feature: events
*
*/
Expand Down Expand Up @@ -77,18 +68,10 @@
},

_listen: function(node, eventName, handler) {
switch (eventName) {
case 'tap':
case 'track':
Polymer.Gestures.add(eventName, node, handler);
break;

default:
node.addEventListener(eventName, handler);
break;
}
node.addEventListener(eventName, handler);
},

// TODO(dfreedm): remove when a11y keys element is ported
keyCodes: {
ESC_KEY: 27,
ENTER_KEY: 13,
Expand Down
Loading