Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3725)

Unified Diff: chrome/browser/resources/pdf/gesture_detector.js

Issue 2617663002: WIP: run clang-format-js on lots of things (Closed)
Patch Set: merge Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/pdf/gesture_detector.js
diff --git a/chrome/browser/resources/pdf/gesture_detector.js b/chrome/browser/resources/pdf/gesture_detector.js
index fde4650d92bbbc6db1d8ed7aa7259c90a9e144c3..e5fbccffb108a945c0567eec29e35c8908ea8170 100644
--- a/chrome/browser/resources/pdf/gesture_detector.js
+++ b/chrome/browser/resources/pdf/gesture_detector.js
@@ -17,22 +17,19 @@ class GestureDetector {
this.element_ = element;
this.element_.addEventListener(
- 'touchstart', this.onTouchStart_.bind(this), { passive: false });
+ 'touchstart', this.onTouchStart_.bind(this), {passive: false});
this.element_.addEventListener(
- 'touchmove', this.onTouch_.bind(this), { passive: true });
+ 'touchmove', this.onTouch_.bind(this), {passive: true});
this.element_.addEventListener(
- 'touchend', this.onTouch_.bind(this), { passive: true });
+ 'touchend', this.onTouch_.bind(this), {passive: true});
this.element_.addEventListener(
- 'touchcancel', this.onTouch_.bind(this), { passive: true });
+ 'touchcancel', this.onTouch_.bind(this), {passive: true});
this.pinchStartEvent_ = null;
this.lastEvent_ = null;
- this.listeners_ = new Map([
- ['pinchstart', []],
- ['pinchupdate', []],
- ['pinchend', []]
- ]);
+ this.listeners_ =
+ new Map([['pinchstart', []], ['pinchupdate', []], ['pinchend', []]]);
}
/**
@@ -70,10 +67,8 @@ class GestureDetector {
event.preventDefault();
this.pinchStartEvent_ = event;
this.lastEvent_ = event;
- this.notify_({
- type: 'pinchstart',
- center: GestureDetector.center_(event)
- });
+ this.notify_(
+ {type: 'pinchstart', center: GestureDetector.center_(event)});
}
}
@@ -104,8 +99,8 @@ class GestureDetector {
}
let scaleRatio = GestureDetector.pinchScaleRatio_(event, this.lastEvent_);
- let startScaleRatio = GestureDetector.pinchScaleRatio_(
- event, this.pinchStartEvent_);
+ let startScaleRatio =
+ GestureDetector.pinchScaleRatio_(event, this.pinchStartEvent_);
let center = GestureDetector.center_(event);
this.notify_({
type: 'pinchupdate',

Powered by Google App Engine
This is Rietveld 408576698