| 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] + ')';
|
| },
|
|
|