Make hover a *teensy* bit clearer.

This commit is contained in:
Olly Smith 2012-10-27 18:31:21 +01:00
parent e76f6c8e0a
commit 16b88ba1de
4 changed files with 7 additions and 4 deletions

View File

@ -24,7 +24,7 @@ class Morris.EventEmitter
# Morris.commas(1234567) -> '1,234,567'
Morris.commas = (num) ->
if num is null
"n/a"
"-"
else
ret = if num < 0 then "-" else ""
absnum = Math.abs(num)

View File

@ -44,7 +44,7 @@
Morris.commas = function(num) {
var absnum, intnum, ret, strabsnum;
if (num === null) {
return "n/a";
return "-";
} else {
ret = num < 0 ? "-" : "";
absnum = Math.abs(num);

2
morris.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -33,3 +33,6 @@ describe '#commas', ->
Morris.commas(-12.34).should.equal("-12.34")
Morris.commas(-123.456).should.equal("-123.456")
Morris.commas(-1234.56).should.equal("-1,234.56")
# null
Morris.commas(null).should.equal('-')