| Index: tracing/tracing/ui/tracks/chart_series_y_axis.html
|
| diff --git a/tracing/tracing/ui/tracks/chart_series_y_axis.html b/tracing/tracing/ui/tracks/chart_series_y_axis.html
|
| index 2c8d52d12410c7dcff6a87dd52996d42ec9dd170..e6c524d9228046ad2318413307593c884b659133 100644
|
| --- a/tracing/tracing/ui/tracks/chart_series_y_axis.html
|
| +++ b/tracing/tracing/ui/tracks/chart_series_y_axis.html
|
| @@ -28,10 +28,12 @@ tr.exportTo('tr.ui.tracks', function() {
|
| function ChartSeriesYAxis(opt_min, opt_max) {
|
| this.guid_ = tr.b.GUID.allocateSimple();
|
| this.bounds = new tr.b.Range();
|
| - if (opt_min !== undefined)
|
| + if (opt_min !== undefined) {
|
| this.bounds.addValue(opt_min);
|
| - if (opt_max !== undefined)
|
| + }
|
| + if (opt_max !== undefined) {
|
| this.bounds.addValue(opt_max);
|
| + }
|
| }
|
|
|
| ChartSeriesYAxis.prototype = {
|
| @@ -40,11 +42,11 @@ tr.exportTo('tr.ui.tracks', function() {
|
| },
|
|
|
| valueToUnitRange: function(value) {
|
| - if (this.bounds.isEmpty)
|
| + if (this.bounds.isEmpty) {
|
| throw new Error('Chart series y-axis bounds are empty');
|
| + }
|
| var bounds = this.bounds;
|
| - if (bounds.range === 0)
|
| - return 0;
|
| + if (bounds.range === 0) return 0;
|
| return (value - bounds.min) / bounds.range;
|
| },
|
|
|
| @@ -95,8 +97,7 @@ tr.exportTo('tr.ui.tracks', function() {
|
| * false), this method will only modify the y-axis bounds if they are empty.
|
| */
|
| autoSetFromRange: function(range, opt_config) {
|
| - if (range.isEmpty)
|
| - return;
|
| + if (range.isEmpty) return;
|
|
|
| var bounds = this.bounds;
|
| if (bounds.isEmpty) {
|
| @@ -104,8 +105,7 @@ tr.exportTo('tr.ui.tracks', function() {
|
| return;
|
| }
|
|
|
| - if (!opt_config)
|
| - return;
|
| + if (!opt_config) return;
|
|
|
| var useRangeMin = (opt_config.expandMin && range.min < bounds.min ||
|
| opt_config.shrinkMin && range.min > bounds.min);
|
| @@ -113,8 +113,7 @@ tr.exportTo('tr.ui.tracks', function() {
|
| opt_config.shrinkMax && range.max < bounds.max);
|
|
|
| // Neither bound is modified.
|
| - if (!useRangeMin && !useRangeMax)
|
| - return;
|
| + if (!useRangeMin && !useRangeMax) return;
|
|
|
| // Both bounds are modified. Assuming the range argument is a valid
|
| // range, no extra checks are necessary.
|
|
|