Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1527)

Unified Diff: closure/goog/fx/dragger.js

Issue 5150047: Add touch handling to BrowserEvent, removing from Dragger Base URL: http://closure-library.googlecode.com/svn/trunk/
Patch Set: Updated for compatibility w/ SVN r2127 Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « closure/goog/events/browserevent_test.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: closure/goog/fx/dragger.js
===================================================================
--- closure/goog/fx/dragger.js (revision 2127)
+++ closure/goog/fx/dragger.js (working copy)
@@ -410,3 +410,2 @@
(!isMouseDown || e.isMouseActionButton())) {
- this.maybeReinitTouchEvent_(e);
if (this.hysteresisDistanceSquared_ == 0) {
@@ -521,3 +520,2 @@
if (this.dragging_) {
- this.maybeReinitTouchEvent_(e);
this.dragging_ = false;
@@ -554,21 +552,2 @@
/**
- * Re-initializes the event with the first target touch event or, in the case
- * of a stop event, the last changed touch.
- * @param {goog.events.BrowserEvent} e A TOUCH... event.
- * @private
- */
-goog.fx.Dragger.prototype.maybeReinitTouchEvent_ = function(e) {
- var type = e.type;
-
- if (type == goog.events.EventType.TOUCHSTART ||
- type == goog.events.EventType.TOUCHMOVE) {
- e.init(e.getBrowserEvent().targetTouches[0], e.currentTarget);
- } else if (type == goog.events.EventType.TOUCHEND ||
- type == goog.events.EventType.TOUCHCANCEL) {
- e.init(e.getBrowserEvent().changedTouches[0], e.currentTarget);
- }
-};
-
-
-/**
* Event handler that is used on mouse / touch move to update the drag
@@ -579,3 +558,2 @@
if (this.enabled_) {
- this.maybeReinitTouchEvent_(e);
// dx in right-to-left cases is relative to the right.
« no previous file with comments | « closure/goog/events/browserevent_test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b