summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2014-09-21 16:03:51 +0300
committerAlon Levy <alon@pobox.com>2014-09-21 16:03:51 +0300
commit9aa40fd4881538878fa68b035f79a72cfaf13b29 (patch)
tree9e90831c3d8d04fe8b1db6f1e80b802cb1143b95 /scripts
parent5e71e6a03a34384a27e583a13dd82b64c229caaa (diff)
textanalysis-ui: add note about 200 Hz text analysis being perhaps overzealous
Diffstat (limited to 'scripts')
-rw-r--r--scripts/textanalysis-ui.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/textanalysis-ui.js b/scripts/textanalysis-ui.js
index 66d270d8..b9e69ca7 100644
--- a/scripts/textanalysis-ui.js
+++ b/scripts/textanalysis-ui.js
@@ -140,14 +140,15 @@ function changeType(arg, id) {
graph.updateGraph();
}
+/* TODO: don't use interval by default but only if keys are comming to fast (but still - 5 ms??) */
window.setInterval(function() {
if ($('#textanalyser').val() != text) {
- if(text.length*8>500)$('#textanalyser').css('width',text.length*8+20);
+ if(text.length*8 > 500)$('#textanalyser').css('width',text.length*8+20);
// text changed
text = $('#textanalyser').val();
analyzeSentence(text, false);
- suggestionChange=false;
+ suggestionChange = false;
}
}, 5);