Linting fixes

This commit is contained in:
Colin McLeod
2015-06-07 16:31:12 -07:00
parent fb35918839
commit 534a843df1
4 changed files with 8 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
angular.module('app', ['ui.router', 'ct.ui.router.extras.sticky', 'ui.sortable', 'shipyard', 'ngLodash', 'app.templates']) angular.module('app', ['ui.router', 'ct.ui.router.extras.sticky', 'ui.sortable', 'shipyard', 'ngLodash', 'app.templates'])
.run(['$rootScope', '$location', '$window', '$document','$state','commonArray','shipPurpose','shipSize','hardPointClass','internalGroupMap','hardpointsGroupMap', 'Persist', '$state', function ($rootScope, $location, $window, $doc, $state, CArr, shipPurpose, sz, hpc, igMap, hgMap, Persist, $state) { .run(['$rootScope', '$location', '$window', '$document','$state','commonArray','shipPurpose','shipSize','hardPointClass','internalGroupMap','hardpointsGroupMap', 'Persist', function ($rootScope, $location, $window, $doc, $state, CArr, shipPurpose, sz, hpc, igMap, hgMap, Persist) {
// App is running as a standalone web app on tablet/mobile // App is running as a standalone web app on tablet/mobile
var isStandAlone = $window.navigator.standalone || ($window.external && $window.external.msIsSiteMode && $window.external.msIsSiteMode()); var isStandAlone = $window.navigator.standalone || ($window.external && $window.external.msIsSiteMode && $window.external.msIsSiteMode());

View File

@@ -16,7 +16,7 @@ angular.module('app').directive('areaChart', ['$window', function ($window) {
fmtLong = d3.format('.2f'), fmtLong = d3.format('.2f'),
func = series.func, func = series.func,
drag = d3.behavior.drag(), drag = d3.behavior.drag(),
dragging = false; dragging = false,
// Define Axes // Define Axes
xAxis = d3.svg.axis().outerTickSize(0).orient("bottom").tickFormat(d3.format('.2r')), xAxis = d3.svg.axis().outerTickSize(0).orient("bottom").tickFormat(d3.format('.2r')),
yAxis = d3.svg.axis().outerTickSize(0).orient("left").tickFormat(fmt), yAxis = d3.svg.axis().outerTickSize(0).orient("left").tickFormat(fmt),
@@ -111,7 +111,7 @@ angular.module('app').directive('areaChart', ['$window', function ($window) {
// Remove existing elements // Remove existing elements
vis.selectAll('path.area').remove(); vis.selectAll('path.area').remove();
var path = vis.insert("path",':first-child') // Area/Path to appear behind everything else vis.insert("path",':first-child') // Area/Path to appear behind everything else
.datum(data) .datum(data)
.attr("class", "area") .attr("class", "area")
.attr('fill', 'url(#gradient)') .attr('fill', 'url(#gradient)')
@@ -131,7 +131,7 @@ angular.module('app').directive('areaChart', ['$window', function ($window) {
dragging = false; dragging = false;
hideTip(); hideTip();
}) })
.on('drag', moveTip) .on('drag', moveTip);
} }
function showTip() { function showTip() {

View File

@@ -33,7 +33,7 @@ angular.module('app').directive('barChart', ['$window', function ($window) {
y1 = d3.scale.ordinal(), y1 = d3.scale.ordinal(),
x = d3.scale.linear(), x = d3.scale.linear(),
yAxis = d3.svg.axis().scale(y0).outerTickSize(0).orient('left'), yAxis = d3.svg.axis().scale(y0).outerTickSize(0).orient('left'),
xAxis = d3.svg.axis().scale(x).ticks(5).outerTickSize(0).orient('bottom').tickFormat(d3.format('.2s'));; xAxis = d3.svg.axis().scale(x).ticks(5).outerTickSize(0).orient('bottom').tickFormat(d3.format('.2s'));
// Create chart // Create chart
var svg = d3.select(element[0]).append('svg'); var svg = d3.select(element[0]).append('svg');
@@ -70,10 +70,10 @@ angular.module('app').directive('barChart', ['$window', function ($window) {
function render() { function render() {
var data = scope.data, var data = scope.data,
width = element[0].offsetWidth, width = element[0].offsetWidth,
w = width - margin.left - margin.right; w = width - margin.left - margin.right,
height = 45 + (30 * data.length), height = 45 + (30 * data.length),
h = height - margin.top - margin.bottom, h = height - margin.top - margin.bottom,
maxVal = d3.max(data, function(d) { return d3.max(properties, function(p) {return d[p]; }); }), maxVal = d3.max(data, function(d) { return d3.max(properties, function(p) {return d[p]; }); });
// Update chart size // Update chart size
svg.attr('width', width).attr('height', height); svg.attr('width', width).attr('height', height);

View File

@@ -99,7 +99,7 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength',
this.ladenTotalRange = fuelRemaining > 0? calcJumpRange(this.unladenMass + this.cargoCapacity + fuelRemaining, fsd, fuelRemaining): 0; this.ladenTotalRange = fuelRemaining > 0? calcJumpRange(this.unladenMass + this.cargoCapacity + fuelRemaining, fsd, fuelRemaining): 0;
// For each max fuel jump, calculate the max jump range based on fuel left in the tank // For each max fuel jump, calculate the max jump range based on fuel left in the tank
for (var j = 0, jumps = Math.floor(jumps); j < jumps; j++) { for (var j = 0, l = Math.floor(jumps); j < l; j++) {
fuelRemaining += fsd.maxfuel; fuelRemaining += fsd.maxfuel;
this.unladenTotalRange += calcJumpRange(this.unladenMass + fuelRemaining, fsd); this.unladenTotalRange += calcJumpRange(this.unladenMass + fuelRemaining, fsd);
this.ladenTotalRange += calcJumpRange(this.unladenMass + this.cargoCapacity + fuelRemaining, fsd); this.ladenTotalRange += calcJumpRange(this.unladenMass + this.cargoCapacity + fuelRemaining, fsd);