- fix go to next/previous page

This commit is contained in:
Richard Alam 2014-03-04 14:59:19 +00:00
parent bc5f60923c
commit a5c9932498
3 changed files with 14 additions and 15 deletions

View File

@ -109,8 +109,9 @@ package org.bigbluebutton.modules.present.model
var pageNum:int = int(ids[1]);
trace(LOG + "page id [" + id + "] ids= [" + presId + "," + pageNum + "] " + ids[1]);
var pres:Presentation = getPresentation(presId);
trace(LOG + "Next page [" + presId + "/" + (pageNum + 1) + "]");
return pres.getPage(presId + "/" + (pageNum + 1));
var nextPage:int = pageNum + 1;
trace(LOG + "Next page [" + presId + "/" + nextPage + "]");
return pres.getPage(presId + "/" + nextPage);
}
return null;
@ -123,8 +124,9 @@ package org.bigbluebutton.modules.present.model
var pageNum:int = int(ids[1]);
trace(LOG + "page id [" + id + "] ids= [" + presId + "," + pageNum + "] " + ids[1]);
var pres:Presentation = getPresentation(presId);
trace(LOG + "Prev page [" + presId + "/" + (pageNum - 1) + "]");
return pres.getPage(presId + "/" + (pageNum - 1));
var prevPage:int = pageNum - 1;
trace(LOG + "Prev page [" + presId + "/" + prevPage + "]");
return pres.getPage(presId + "/" + prevPage);
}
return null;

View File

@ -1,9 +1,7 @@
package org.bigbluebutton.modules.present.services
{
import com.asfusion.mate.events.Dispatcher;
import mx.collections.ArrayCollection;
import com.asfusion.mate.events.Dispatcher;
import mx.collections.ArrayCollection;
import org.bigbluebutton.modules.present.commands.ChangePageCommand;
import org.bigbluebutton.modules.present.events.CursorEvent;
import org.bigbluebutton.modules.present.events.PageChangedEvent;
@ -54,8 +52,8 @@ package org.bigbluebutton.modules.present.services
np.widthRatio = page.widthRatio;
np.heightRatio = page.heightRatio;
trace(LOG + "Sending page changed event. page [" + np.id + "]");
var event: PageChangedEvent = new PageChangedEvent(np.id);
dispatcher.dispatchEvent(event);
var changePageCommand: ChangePageCommand = new ChangePageCommand(np.id);
dispatcher.dispatchEvent(changePageCommand);
}
}
@ -81,8 +79,7 @@ package org.bigbluebutton.modules.present.services
return page;
}
public function changePresentation(pres: PresentationVO):void {
public function changePresentation(pres: PresentationVO):void {
// We've switched presentations. Mark the old presentation as not current.
var curPres:Presentation = PresentationModel.getInstance().getCurrentPresentation();
if (curPres != null) {

View File

@ -284,9 +284,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
* Handles notification from presenter that the slide has moved.
*/
private function handlePageChangedEvent(e:PageChangedEvent):void{
if (UserManager.getInstance().getConference().amIPresenter) {
return;
}
// if (UserManager.getInstance().getConference().amIPresenter) {
// return;
// }
var page:Page = PresentationModel.getInstance().getPage(e.pageId);
if (page != null) {