Skip to content

Commit

Permalink
Merge pull request watson-developer-cloud#10 from herchu/master
Browse files Browse the repository at this point in the history
Minor UI fixes
  • Loading branch information
germanattanasio committed Oct 16, 2015
2 parents b616f0b + 6d89a6f commit 17374bd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules
.DS_Store
VCAP_SERVICES.json
run.sh
env*.sh
4 changes: 2 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ require('./config/express')(app);

var credentials = extend({
version: 'v2',
username: '<username>',
password: '<password>'
username: '<username>',//
password: '<password>'//
}, bluemix.getServiceCreds('tone_analyzer'));


Expand Down
6 changes: 4 additions & 2 deletions public/js/visualization.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions views/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 17374bd

Please sign in to comment.