From e99bbd01141e90f19cc8f90d57158ac9ebcad04f Mon Sep 17 00:00:00 2001 From: rajbot Date: Wed, 13 Oct 2010 03:21:11 +0000 Subject: [PATCH] set this.ttsPlaying earlier. show tts popup earlier. --- BookReader/BookReader.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/BookReader/BookReader.js b/BookReader/BookReader.js index 2a59cd1..9b27bf9 100644 --- a/BookReader/BookReader.js +++ b/BookReader/BookReader.js @@ -4343,7 +4343,9 @@ BookReader.util = { // ttsToggle() //______________________________________________________________________________ BookReader.prototype.ttsToggle = function () { - if (false == this.ttsPlaying) { + if (false == this.ttsPlaying) { + this.ttsPlaying = true; + this.ttsShowPopup(); if(soundManager.supported()) { this.ttsStart(); } else { @@ -4366,7 +4368,7 @@ BookReader.prototype.ttsStart = function () { if (soundManager.debugMode) console.log('starting readAloud'); if (this.constModeThumb == this.mode) this.switchMode(this.constMode1up); - this.ttsPlaying = true; + //this.ttsPlaying = true; //set this in ttsToggle() this.ttsIndex = this.currentIndex(); this.ttsFormat = 'mp3'; if ($.browser.mozilla) { @@ -4438,6 +4440,7 @@ BookReader.prototype.ttsStartCB = function (data) { //______________________________________________________________________________ BookReader.prototype.ttsShowPopup = function() { if (soundManager.debugMode) console.log('ttsShowPopup index='+this.ttsIndex+' pos='+this.ttsPosition); + if (this.popup) return; this.popup = document.createElement("div"); $(this.popup).css({ -- 2.20.1