Skip to content

Commit

Permalink
Properly shows arrows with null intensity
Browse files Browse the repository at this point in the history
  • Loading branch information
corradio committed Sep 24, 2017
1 parent 1affb39 commit 9762cfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/app/exchangelayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ ExchangeLayer.prototype.render = function() {
.select('img')
.attr('src', function (d) {
var intensity = Math.min(maxCarbonIntensity, Math.floor(d.co2intensity - d.co2intensity%arrowCarbonIntensitySliceSize));
if(isNaN(intensity)) intensity = 'nan';
if(d.co2intensity == null || isNaN(intensity)) intensity = 'nan';
return 'images/arrow-'+intensity+'-animated-'+that.exchangeAnimationDurationScale(Math.abs(d.netFlow || 0))+'.gif';
});
}
Expand Down

0 comments on commit 9762cfb

Please sign in to comment.