From 90b339e5c3759284dd9ea4973150bea22404afcb Mon Sep 17 00:00:00 2001 From: Colin McLeod Date: Wed, 7 Oct 2015 11:32:52 -0700 Subject: [PATCH] Correct 50% warning on power band --- app/js/directives/directive-power-bands.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/js/directives/directive-power-bands.js b/app/js/directives/directive-power-bands.js index 900b0884..816c1ef2 100644 --- a/app/js/directives/directive-power-bands.js +++ b/app/js/directives/directive-power-bands.js @@ -103,7 +103,7 @@ angular.module('app').directive('powerBands', ['$window', '$translate', '$rootSc vis.selectAll('.pct.axis').attr('transform', 'translate(0,' + innerHeight + ')').call(pctAxis); var pwrWarningClass = 'threshold' + (bands[0].retractedSum * 2 >= available ? ' exceeded' : ''); - vis.selectAll('.pct.axis g:nth-child(6)').selectAll('line, text').attr('class', pwrWarningClass); + vis.select('.pct.axis g:nth-child(6)').selectAll('line, text').attr('class', pwrWarningClass); wattAxisGroup.append('line') .attr('x1', pctScale(0.5)) @@ -112,8 +112,6 @@ angular.module('app').directive('powerBands', ['$window', '$translate', '$rootSc .attr('y2', innerHeight) .attr('class', pwrWarningClass); - - retText.attr('y', repY); depText.attr('y', depY); updateLabel(retLbl, w, repY, retBandsSelected, retBandsSelected ? retractedSum : maxBand.retractedSum, available);