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

Unified Diff: tracing/tracing/base/math/bbox2.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/base/iteration_helpers.html ('k') | tracing/tracing/base/math/math.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/base/math/bbox2.html
diff --git a/tracing/tracing/base/math/bbox2.html b/tracing/tracing/base/math/bbox2.html
index b7520cb54bb53391e4940c396f8b590af7e1289d..b184414374c1c9ae27cc4a43e81852d1683aa389 100644
--- a/tracing/tracing/base/math/bbox2.html
+++ b/tracing/tracing/base/math/bbox2.html
@@ -39,8 +39,7 @@ tr.exportTo('tr.b.math', function() {
},
addBBox2: function(bbox2) {
- if (bbox2.isEmpty)
- return;
+ if (bbox2.isEmpty) return;
this.addVec2(bbox2.min_);
this.addVec2(bbox2.max_);
},
@@ -95,47 +94,48 @@ tr.exportTo('tr.b.math', function() {
},
get minVec2() {
- if (this.isEmpty_)
- return undefined;
+ if (this.isEmpty_) return undefined;
return this.min_;
},
get maxVec2() {
- if (this.isEmpty_)
- return undefined;
+ if (this.isEmpty_) return undefined;
return this.max_;
},
get sizeAsVec2() {
- if (this.isEmpty_)
+ if (this.isEmpty_) {
throw new Error('Empty BBox2 has no size');
+ }
var size = vec2.create();
vec2.subtract(size, this.max_, this.min_);
return size;
},
get size() {
- if (this.isEmpty_)
+ if (this.isEmpty_) {
throw new Error('Empty BBox2 has no size');
+ }
return {width: this.max_[0] - this.min_[0],
height: this.max_[1] - this.min_[1]};
},
get width() {
- if (this.isEmpty_)
+ if (this.isEmpty_) {
throw new Error('Empty BBox2 has no width');
+ }
return this.max_[0] - this.min_[0];
},
get height() {
- if (this.isEmpty_)
+ if (this.isEmpty_) {
throw new Error('Empty BBox2 has no width');
+ }
return this.max_[1] - this.min_[1];
},
toString: function() {
- if (this.isEmpty_)
- return 'empty';
+ if (this.isEmpty_) return 'empty';
return 'min=(' + this.min_[0] + ',' + this.min_[1] + ') ' +
'max=(' + this.max_[0] + ',' + this.max_[1] + ')';
},
« no previous file with comments | « tracing/tracing/base/iteration_helpers.html ('k') | tracing/tracing/base/math/math.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698