diff --git a/.gitignore b/.gitignore index b89d2b8d..996415b9 100755 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules .DS_Store VCAP_SERVICES.json run.sh +env*.sh diff --git a/app.js b/app.js index 5ad94a97..61ee0f62 100755 --- a/app.js +++ b/app.js @@ -27,8 +27,8 @@ require('./config/express')(app); var credentials = extend({ version: 'v2', - username: '', - password: '' + username: '',// + password: ''// }, bluemix.getServiceCreds('tone_analyzer')); diff --git a/public/js/visualization.js b/public/js/visualization.js index 430f3a6e..f0b60e9f 100644 --- a/public/js/visualization.js +++ b/public/js/visualization.js @@ -115,7 +115,7 @@ umviz.models.toneGenome = function() { function toPercentage(val) { var tmp = val * 100; - return Math.floor(tmp) + '%'; + return Math.round(tmp) + '%'; } function render(selector, d) { @@ -517,8 +517,10 @@ umviz.models.toneGenome = function() { $('#output_div').css('color', '#ddd'); $('.matched-word').css('opacity', 0.2); - if (corr === null) + if (corr === null){ $('.' + cate + '_' + corrType.positive).css('opacity', 1); + $('.' + cate + '_' + corrType.negative).css('opacity', 1); + } else $('.' + cate + '_' + corr).css('opacity', 1); } diff --git a/views/index.jade b/views/index.jade index bde254e0..d817e304 100755 --- a/views/index.jade +++ b/views/index.jade @@ -74,9 +74,9 @@ block row-content | and the total number of words for each individual | tone trait. div.tab-pane(id="json", role="tabpanel") - pre.json-div + pre.json-div div#visualization - p.text-output-label Click on any highlighted word to see suggested synonyms. + p.text-output-label Social tones include both positively and negatively correlated words, and click to see details. Click on any highlighted word to see suggested synonyms. div.text-output-div //this is synonym pop-up panel