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

Unified Diff: tracing/tracing/ui/tracks/x_axis_track.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
« no previous file with comments | « tracing/tracing/ui/tracks/track.html ('k') | tracing/tracing/ui/view_specific_brushing_state.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/ui/tracks/x_axis_track.html
diff --git a/tracing/tracing/ui/tracks/x_axis_track.html b/tracing/tracing/ui/tracks/x_axis_track.html
index 72176a7ddaa2fe6fec34163a9bdf25f2db94f2a1..3e498a07927c986ba834bbea0401008488b311c9 100644
--- a/tracing/tracing/ui/tracks/x_axis_track.html
+++ b/tracing/tracing/ui/tracks/x_axis_track.html
@@ -57,10 +57,11 @@ tr.exportTo('tr.ui.tracks', function() {
},
viewportChange_: function() {
- if (this.viewport.interestRange.isEmpty)
+ if (this.viewport.interestRange.isEmpty) {
Polymer.dom(this).classList.remove('tall-mode');
- else
+ } else {
Polymer.dom(this).classList.add('tall-mode');
+ }
},
draw: function(type, viewLWorld, viewRWorld) {
@@ -69,9 +70,10 @@ tr.exportTo('tr.ui.tracks', function() {
this.drawGrid_(viewLWorld, viewRWorld);
break;
case tr.ui.tracks.DrawType.MARKERS:
- if (!this.viewport.interestRange.isEmpty)
+ if (!this.viewport.interestRange.isEmpty) {
this.viewport.interestRange.draw(this.context(),
viewLWorld, viewRWorld);
+ }
break;
}
},
@@ -148,8 +150,7 @@ tr.exportTo('tr.ui.tracks', function() {
ctx.stroke();
// Give distance between directly adjacent markers.
- if (!hasInterestRange)
- return;
+ if (!hasInterestRange) return;
// Draw middle bar.
tr.ui.b.drawLine(ctx, 0, xAxisHeightPx, width, xAxisHeightPx);
@@ -183,8 +184,9 @@ tr.exportTo('tr.ui.tracks', function() {
var textWidthView = ctx.measureText(textToDraw).width;
// Put text to the left in case it gets cut off.
- if (textLeftView + textWidthView > width)
+ if (textLeftView + textWidthView > width) {
textLeftView = markerView - 4 * pixelRatio - textWidthView;
+ }
ctx.fillStyle = displayTextColor;
ctx.fillText(textToDraw, textLeftView, textPosY);
@@ -217,8 +219,9 @@ tr.exportTo('tr.ui.tracks', function() {
textLeftView = rightMarkerView + 2 * arrowSpacing;
// Put text to the left in case it gets cut off.
- if (textLeftView + textWidthView > width)
+ if (textLeftView + textWidthView > width) {
textLeftView = leftMarkerView - 2 * arrowSpacing - textWidthView;
+ }
ctx.fillStyle = displayTextColor;
ctx.fillText(textToDraw, textLeftView, textPosY);
« no previous file with comments | « tracing/tracing/ui/tracks/track.html ('k') | tracing/tracing/ui/view_specific_brushing_state.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698