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

Unified Diff: tracing/tracing/ui/timeline_interest_range.html

Issue 2776653002: [ESLint] Fix violations when enabling curly rule in eslint. (Closed)
Patch Set: rebase Created 3 years, 9 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: tracing/tracing/ui/timeline_interest_range.html
diff --git a/tracing/tracing/ui/timeline_interest_range.html b/tracing/tracing/ui/timeline_interest_range.html
index f7cf97a606b154c79e2ae2e8023025168ee6655d..3550cecf31230fcafe844f1e68aeca34c7f3de63 100644
--- a/tracing/tracing/ui/timeline_interest_range.html
+++ b/tracing/tracing/ui/timeline_interest_range.html
@@ -95,8 +95,8 @@ tr.exportTo('tr.ui', function() {
},
set leftSelected(leftSelected) {
- if (this.leftSelected_ === leftSelected)
- return;
+ if (this.leftSelected_ === leftSelected) return;
+
this.leftSelected_ = leftSelected;
this.viewport_.dispatchChangeEvent();
},
@@ -106,8 +106,8 @@ tr.exportTo('tr.ui', function() {
},
set rightSelected(rightSelected) {
- if (this.rightSelected_ === rightSelected)
- return;
+ if (this.rightSelected_ === rightSelected) return;
+
this.rightSelected_ = rightSelected;
this.viewport_.dispatchChangeEvent();
},
@@ -131,8 +131,8 @@ tr.exportTo('tr.ui', function() {
},
draw: function(ctx, viewLWorld, viewRWorld) {
- if (this.range_.isEmpty)
- return;
+ if (this.range_.isEmpty) return;
+
var dt = this.viewport_.currentDisplayTransform;
var markerLWorld = this.min;
@@ -168,8 +168,7 @@ tr.exportTo('tr.ui', function() {
},
drawLine_: function(ctx, viewLWorld, viewRWorld, height, ts, selected) {
- if (ts < viewLWorld || ts >= viewRWorld)
- return;
+ if (ts < viewLWorld || ts >= viewRWorld) return;
var dt = this.viewport_.currentDisplayTransform;
var viewX = Math.round(dt.xWorldToView(ts));
@@ -181,10 +180,11 @@ tr.exportTo('tr.ui', function() {
ctx.beginPath();
tr.ui.b.drawLine(ctx, viewX, 0, viewX, height);
- if (selected)
+ if (selected) {
ctx.strokeStyle = 'rgb(255, 0, 0)';
- else
+ } else {
ctx.strokeStyle = 'rgb(0, 0, 0)';
+ }
ctx.stroke();
ctx.restore();
@@ -221,10 +221,11 @@ tr.exportTo('tr.ui', function() {
var viewHeight = si.height * devicePixelRatio;
var arrowSize = 4 * pixelRatio;
- if (selected)
+ if (selected) {
ctx.fillStyle = 'rgb(255, 0, 0)';
- else
+ } else {
ctx.fillStyle = 'rgb(0, 0, 0)';
+ }
tr.ui.b.drawTriangle(ctx,
viewX - arrowSize * 0.75, viewY,
viewX + arrowSize * 0.75, viewY,
« no previous file with comments | « tracing/tracing/ui/timeline_display_transform_animations.html ('k') | tracing/tracing/ui/timeline_track_view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698