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

Unified Diff: tracing/tracing/ui/tracks/chart_series.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/tracks/chart_series.html
diff --git a/tracing/tracing/ui/tracks/chart_series.html b/tracing/tracing/ui/tracks/chart_series.html
index df6898a378a0bd84196dfe2ea5dcca37e54953f8..f07fd9c0f6cb4eb58890151e4d9b55f1aa04e759 100644
--- a/tracing/tracing/ui/tracks/chart_series.html
+++ b/tracing/tracing/ui/tracks/chart_series.html
@@ -115,8 +115,9 @@ tr.exportTo('tr.ui.tracks', function() {
for (var [key, defaultValue] of
Object.entries(DEFAULT_RENDERING_CONFIG)) {
var value = config[key];
- if (value === undefined)
+ if (value === undefined) {
value = defaultValue;
+ }
this[key + '_'] = value;
}
@@ -134,8 +135,9 @@ tr.exportTo('tr.ui.tracks', function() {
},
draw: function(ctx, transform, highDetails) {
- if (this.points === undefined || this.points.length === 0)
+ if (this.points === undefined || this.points.length === 0) {
return;
+ }
// Draw the background.
if (this.chartType_ === ChartSeriesType.AREA) {
@@ -503,8 +505,9 @@ tr.exportTo('tr.ui.tracks', function() {
var points = this.points;
function getPointWidth(point, i) {
- if (i === points.length - 1)
+ if (i === points.length - 1) {
return LAST_POINT_WIDTH * viewPixWidthWorld;
+ }
var nextPoint = points[i + 1];
return nextPoint.x - point.x;
}
@@ -523,18 +526,15 @@ tr.exportTo('tr.ui.tracks', function() {
},
addEventNearToProvidedEventToSelection: function(event, offset, selection) {
- if (this.points === undefined)
- return false;
+ if (this.points === undefined) return false;
var index = tr.b.findFirstIndexInArray(this.points, function(point) {
return point.modelItem === event;
}, this);
- if (index === -1)
- return false;
+ if (index === -1) return false;
var newIndex = index + offset;
- if (newIndex < 0 || newIndex >= this.points.length)
- return false;
+ if (newIndex < 0 || newIndex >= this.points.length) return false;
this.points[newIndex].addToSelection(selection);
return true;
@@ -542,8 +542,7 @@ tr.exportTo('tr.ui.tracks', function() {
addClosestEventToSelection: function(worldX, worldMaxDist, loY, hiY,
selection) {
- if (this.points === undefined)
- return;
+ if (this.points === undefined) return;
var item = tr.b.math.findClosestElementInSortedArray(
this.points,
@@ -551,8 +550,7 @@ tr.exportTo('tr.ui.tracks', function() {
worldX,
worldMaxDist);
- if (!item)
- return;
+ if (!item) return;
item.addToSelection(selection);
}
« no previous file with comments | « tracing/tracing/ui/tracks/async_slice_group_track.html ('k') | tracing/tracing/ui/tracks/chart_series_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698