From e9a0a01e14957377e53a236028e2282a158b2ce0 Mon Sep 17 00:00:00 2001 From: Colin McLeod Date: Mon, 21 Sep 2015 21:42:48 -0700 Subject: [PATCH] Lint fixes --- app/js/controllers/controller-outfit.js | 4 ++-- app/js/directives/directive-bar-chart.js | 2 +- app/js/shipyard/factory-ship.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/js/controllers/controller-outfit.js b/app/js/controllers/controller-outfit.js index 0c7e5aee..b7b10da3 100755 --- a/app/js/controllers/controller-outfit.js +++ b/app/js/controllers/controller-outfit.js @@ -100,7 +100,7 @@ angular.module('app').controller('OutfitController', ['$window', '$rootScope', ' $scope.speedSeries = { xMin: 0, xMax: ship.cargoCapacity, - yMax: calcSpeed(ship.unladenMass, ship.speed, ship.boost, $scope.th.c, ship.pipSpeed)['boost'], + yMax: calcSpeed(ship.unladenMass, ship.speed, ship.boost, $scope.th.c, ship.pipSpeed).boost, yMin: 0, series: ['boost', '4 Pips', '2 Pips', '0 Pips'], colors: ['#0088d2', '#ff8c0d', '#D26D00', '#c06400'], @@ -361,7 +361,7 @@ angular.module('app').controller('OutfitController', ['$window', '$rootScope', ' $scope.speedSeries.xMax = $scope.trSeries.xMax = $scope.jrSeries.xMax = ship.cargoCapacity; $scope.jrSeries.yMax = ship.unladenRange; $scope.trSeries.yMax = ship.unladenTotalRange; - $scope.speedSeries.yMax = calcSpeed(ship.unladenMass, ship.speed, ship.boost, $scope.th.c, ship.pipSpeed)['boost']; + $scope.speedSeries.yMax = calcSpeed(ship.unladenMass, ship.speed, ship.boost, $scope.th.c, ship.pipSpeed).boost; updateRetrofitCosts(); win.triggerHandler('pwrchange'); } diff --git a/app/js/directives/directive-bar-chart.js b/app/js/directives/directive-bar-chart.js index 9668e7b7..55e6018e 100755 --- a/app/js/directives/directive-bar-chart.js +++ b/app/js/directives/directive-bar-chart.js @@ -9,7 +9,7 @@ angular.module('app').directive('barChart', ['$window', '$translate', '$rootScop var lines = d.split('\n'); el.text('').attr('y', -6); for (var i = 0; i < lines.length; i++) { - var tspan = el.append('tspan').text(lines[i].length > 18 ? lines[i].substring(0,15) + '...' : lines[i]); + var tspan = el.append('tspan').text(lines[i].length > 18 ? lines[i].substring(0, 15) + '...' : lines[i]); if (i > 0) { tspan.attr('x', -9).attr('dy', '1em'); } else { diff --git a/app/js/shipyard/factory-ship.js b/app/js/shipyard/factory-ship.js index ca0fb474..bae22d2b 100755 --- a/app/js/shipyard/factory-ship.js +++ b/app/js/shipyard/factory-ship.js @@ -400,7 +400,7 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength', Ship.prototype.updateTopSpeed = function() { var speeds = calcSpeed(this.unladenMass + this.fuelCapacity, this.speed, this.boost, this.common[1].c, this.pipSpeed); this.topSpeed = speeds['4 Pips']; - this.topBoost = speeds['boost']; + this.topBoost = speeds.boost; }; Ship.prototype.updateShieldStrength = function() {