Less aggressive filter for speaking tokens, add some docs.
This commit is contained in:
parent
38b42d20d3
commit
c3a681abd1
1 changed files with 9 additions and 2 deletions
|
|
@ -286,9 +286,9 @@ var speakLine = function(row, queue) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var firstToken = tokens[0];
|
var firstToken = tokens[0];
|
||||||
/* Filter out first token and spaces. */
|
/* Filter out first token. */
|
||||||
tokens = tokens.filter(function(token) {
|
tokens = tokens.filter(function(token) {
|
||||||
return token !== firstToken && token.type !== 'text';
|
return token !== firstToken;
|
||||||
});
|
});
|
||||||
/* Speak first token separately to flush if queue. */
|
/* Speak first token separately to flush if queue. */
|
||||||
speakToken_(firstToken, queue);
|
speakToken_(firstToken, queue);
|
||||||
|
|
@ -666,6 +666,12 @@ var initContextMenu = function() {
|
||||||
body.addEventListener('ATCustomEvent', contextMenuHandler, true);
|
body.addEventListener('ATCustomEvent', contextMenuHandler, true);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event handler for find events. When there is a match, we want to speak the
|
||||||
|
* line we are now at. Otherwise, we want to notify the user there was no
|
||||||
|
* match
|
||||||
|
* @param {!Event} evt The event.
|
||||||
|
*/
|
||||||
var onFindSearchbox = function(evt) {
|
var onFindSearchbox = function(evt) {
|
||||||
if (evt.match) {
|
if (evt.match) {
|
||||||
/* There is still a match! Speak the line. */
|
/* There is still a match! Speak the line. */
|
||||||
|
|
@ -742,6 +748,7 @@ var SHORTCUTS = [
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the theme.
|
* Initialize the theme.
|
||||||
|
* @param {Object} editor Editor to use.
|
||||||
*/
|
*/
|
||||||
var init = function(editor) {
|
var init = function(editor) {
|
||||||
cvoxAce.editor = editor;
|
cvoxAce.editor = editor;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue