From 66b324f9ccd14546444d10659929605aa1b9d673 Mon Sep 17 00:00:00 2001 From: David Huynh Date: Wed, 28 Apr 2010 22:53:13 +0000 Subject: [PATCH] When displaying recon scores, don't round to integers; keep 3 decimal digits. git-svn-id: http://google-refine.googlecode.com/svn/trunk@565 7d457c2a-affb-35e4-300a-418c747d4874 --- src/main/webapp/scripts/views/data-table-cell-ui.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/scripts/views/data-table-cell-ui.js b/src/main/webapp/scripts/views/data-table-cell-ui.js index 167c4699e..2cdc06b0d 100644 --- a/src/main/webapp/scripts/views/data-table-cell-ui.js +++ b/src/main/webapp/scripts/views/data-table-cell-ui.js @@ -98,7 +98,13 @@ DataTableCellUI.prototype._render = function() { .text(candidate.name) .appendTo(li); - $('').addClass("data-table-recon-score").text("(" + Math.round(candidate.score) + ")").appendTo(li); + var score; + if (candidate.score < 1) { + score = Math.round(candidate.score * 1000) / 1000; + } else { + score = Math.round(candidate.score) + } + $('').addClass("data-table-recon-score").text("(" + score + ")").appendTo(li); }; for (var i = 0; i < candidates.length; i++) {