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

Unified Diff: tracing/tracing/base/bbox2.html

Issue 2776653002: [ESLint] Fix violations when enabling curly rule in eslint. (Closed)
Patch Set: Fix test 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/base/bbox2.html
diff --git a/tracing/tracing/base/bbox2.html b/tracing/tracing/base/bbox2.html
index 25e07d4319f53ad2737accb034247a8a31aeb14f..9567a5207afe28b18f5dd65b302f9ab710aab6ee 100644
--- a/tracing/tracing/base/bbox2.html
+++ b/tracing/tracing/base/bbox2.html
@@ -39,8 +39,7 @@ tr.exportTo('tr.b', 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', 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] + ')';
},

Powered by Google App Engine
This is Rietveld 408576698