Eslint clean ups

This commit is contained in:
Brenda Wallace
2016-12-07 11:37:18 +13:00
parent af424103f4
commit a23e241480
10 changed files with 16 additions and 24 deletions

View File

@@ -9,7 +9,6 @@
Currently these are used for HorizontalBarGraph.
*/
var growstuff = (window.growstuff = window.growstuff || {});
var WidthScale = growstuff.WidthScale;
var HeightScale = growstuff.HeightScale;
@@ -54,11 +53,11 @@ BarGroup.prototype.getBarValues = function () {
for (i; i < data.bars.length; i++){
barValues.push(data.bars[i].value)
};
}
return barValues;
};
};
growstuff.BarGroup = BarGroup;
})();
}());

View File

@@ -37,4 +37,4 @@ This file draws the labels to the left of each bar.
growstuff.BarLabelGroup = BarLabelGroup;
})();
}())

View File

@@ -12,7 +12,7 @@ the svg
function HeightScale(data){
this._data = data;
};
}
HeightScale.prototype.render = function(){
var data = this._data;
@@ -26,4 +26,4 @@ the svg
growstuff.HeightScale = HeightScale;
})();
}());

View File

@@ -50,4 +50,4 @@ The main dimensions of the graph are rendered here.
};
growstuff.HorizontalBarGraph = HorizontalBarGraph;
})();
}());

View File

@@ -12,19 +12,16 @@ to the display size of the svg
function WidthScale (data){
this._data = data;
};
}
WidthScale.prototype.render = function() {
var data = this._data;
var scaleType = data.width.scale;
var axisSize = data.width.size;
return d3.scale[scaleType]()
.domain([0, d3.max(this.getBarValues())])
.range([0, axisSize]);
};
WidthScale.prototype.getBarValues = function(){
@@ -35,11 +32,11 @@ to the display size of the svg
for (i; i < data.bars.length; i++){
barValues.push(data.bars[i].value)
};
}
return barValues;
}
growstuff.WidthScale = WidthScale;
})();
}());

View File

@@ -62,4 +62,4 @@
});
})();
}());

View File

@@ -1,4 +1,4 @@
function(){
(function(){
'use strict';
/*
@@ -39,4 +39,4 @@ function(){
});
}();
}());

View File

@@ -34,4 +34,4 @@
});
});
})();
}());

View File

@@ -72,4 +72,4 @@
});
})();
}());

View File

@@ -36,10 +36,6 @@
it ('calls the d3 range function to draw the width', function(){
expect(mockD3.range).toHaveBeenCalledWith([0, 300]);
});
});
})();
}());