- handle change presentation
This commit is contained in:
parent
309e7f32c3
commit
5de4cb976c
@ -29,7 +29,7 @@ package org.bigbluebutton.modules.present.events
|
||||
|
||||
public var presentationName:String;
|
||||
private var _slides:PresentationSlides;
|
||||
public var numberOfSlides:int;
|
||||
public var numberOfPages:int;
|
||||
|
||||
public function PresentationEvent(type:String)
|
||||
{
|
||||
@ -38,7 +38,7 @@ package org.bigbluebutton.modules.present.events
|
||||
|
||||
public function set slides(presentSlides:PresentationSlides):void{
|
||||
this._slides = presentSlides;
|
||||
this.numberOfSlides = presentSlides.size();
|
||||
this.numberOfPages = presentSlides.size();
|
||||
}
|
||||
|
||||
public function get slides():PresentationSlides{
|
||||
|
@ -27,8 +27,8 @@ package org.bigbluebutton.modules.whiteboard.events
|
||||
{
|
||||
public static const SEND_SHAPE:String = "sendShape";
|
||||
public static const SEND_TEXT:String = "sendText";
|
||||
public static const CLEAR_BOARD:String = "clearBoard";
|
||||
public static const UNDO_GRAPHIC:String = "undoGraphic";
|
||||
public static const CLEAR:String = "WhiteboardClearCommand";
|
||||
public static const UNDO:String = "WhiteboardUndoCommand";
|
||||
public static const NEW_SHAPE:String = "NewShapeEvent";
|
||||
|
||||
public var message:GraphicObject;
|
||||
|
@ -117,7 +117,7 @@ package org.bigbluebutton.modules.whiteboard.managers
|
||||
|
||||
public function createPages(e:PresentationEvent):void {
|
||||
pages.removeAll();
|
||||
for (var i:int = 0; i<e.numberOfSlides; i++){
|
||||
for (var i:int = 0; i<e.numberOfPages; i++){
|
||||
pages.addItem(new Page());
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,7 @@
|
||||
<MethodInvoker generator="{WhiteboardService}" method="connect" arguments="{event}" />
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{WhiteboardDrawEvent.CLEAR_BOARD}" >
|
||||
<EventHandlers type="{WhiteboardDrawEvent.CLEAR}" >
|
||||
<MethodInvoker generator="{WhiteboardService}" method="clearBoard" />
|
||||
</EventHandlers>
|
||||
|
||||
@ -84,7 +84,7 @@
|
||||
<MethodInvoker generator="{WhiteboardService}" method="sendText" arguments="{event}" />
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{WhiteboardDrawEvent.UNDO_GRAPHIC}" >
|
||||
<EventHandlers type="{WhiteboardDrawEvent.UNDO}" >
|
||||
<MethodInvoker generator="{WhiteboardService}" method="undoGraphic" />
|
||||
</EventHandlers>
|
||||
|
||||
|
@ -31,18 +31,26 @@ package org.bigbluebutton.modules.whiteboard.models
|
||||
|
||||
public function undo():void {
|
||||
_currentPresentation.undo();
|
||||
// _dispatcher.dispatchEvent(new WhiteboardDrawEvent(WhiteboardDrawEvent.UNDO_SHAPE));
|
||||
_dispatcher.dispatchEvent(new WhiteboardDrawEvent(WhiteboardDrawEvent.UNDO));
|
||||
}
|
||||
|
||||
public function clear():void {
|
||||
_currentPresentation.clear();
|
||||
// _dispatcher.dispatchEvent(new WhiteboardDrawEvent(WhiteboardDrawEvent.CLEAR_BOARD));
|
||||
_dispatcher.dispatchEvent(new WhiteboardDrawEvent(WhiteboardDrawEvent.CLEAR));
|
||||
}
|
||||
|
||||
public function changePresentation(parenationID:String, numberOfSlide:int):void {
|
||||
public function changePresentation(presentationID:String, numberOfPages:int):void {
|
||||
|
||||
}
|
||||
|
||||
public function findPresentation(presentationID:String):Presentation {
|
||||
for (var i:int = 0; i < _presentations.length; i++) {
|
||||
var p:Presentation = _presentations.getItemAt(i) as Presentation;
|
||||
if (presentationID == p.id) return p;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function changePage(pageNum:int, numAnnotations:int):void {
|
||||
|
||||
}
|
||||
|
@ -55,8 +55,8 @@ package org.bigbluebutton.modules.whiteboard.services
|
||||
}
|
||||
|
||||
private function handleChangePresentationCommand(message:Object):void {
|
||||
LogUtil.debug("Handle Whiteboard Change Presentation Command [ " + message.presentationID + ", " + message.numberOfSlides + "]");
|
||||
whiteboardModel.changePresentation(message.presentationID, message.numberOfSlides);
|
||||
LogUtil.debug("Handle Whiteboard Change Presentation Command [ " + message.presentationID + ", " + message.numberOfPages + "]");
|
||||
whiteboardModel.changePresentation(message.presentationID, message.numberOfPages);
|
||||
}
|
||||
|
||||
private function handleChangePageCommand(message:Object):void {
|
||||
|
@ -183,7 +183,7 @@ package org.bigbluebutton.modules.whiteboard.services
|
||||
|
||||
var message:Object = new Object();
|
||||
message["presentationID"] = e.presentationName;
|
||||
message["numberOfSlides"] = e.numberOfSlides;
|
||||
message["numberOfSlides"] = e.numberOfPages;
|
||||
|
||||
var _nc:ConnectionManager = BBB.initConnectionManager();
|
||||
_nc.sendMessage("whiteboard.setActivePresentation",
|
||||
|
@ -338,7 +338,7 @@
|
||||
|
||||
private function sendUndoCommand():void{
|
||||
if (!canvas.isPageEmpty())
|
||||
dispatchEvent(new WhiteboardDrawEvent(WhiteboardDrawEvent.UNDO_GRAPHIC));
|
||||
dispatchEvent(new WhiteboardDrawEvent(WhiteboardDrawEvent.UNDO));
|
||||
}
|
||||
|
||||
private function enableWhiteboard(event:WhiteboardButtonEvent = null):void{
|
||||
@ -425,7 +425,7 @@
|
||||
toolTip="{ResourceUtil.getInstance().getString('ltbcustom.bbb.highlighter.toolbar.toggleTransparency')}" toggle="true"/>
|
||||
|
||||
<mx:Spacer height="5" />
|
||||
<mx:Button width="20" height="20" id="btnClear" click="dispatchEvent(new WhiteboardDrawEvent(WhiteboardDrawEvent.CLEAR_BOARD))" icon="{delete_icon}"
|
||||
<mx:Button width="20" height="20" id="btnClear" click="dispatchEvent(new WhiteboardDrawEvent(WhiteboardDrawEvent.CLEAR))" icon="{delete_icon}"
|
||||
toolTip="{ResourceUtil.getInstance().getString('bbb.highlighter.toolbar.clear')}" />
|
||||
<mx:Button width="20" height="20" id="btnUndo" click="sendUndoCommand()" icon="{undo_icon}"
|
||||
toolTip="{ResourceUtil.getInstance().getString('bbb.highlighter.toolbar.undo')}" />
|
||||
|
Loading…
Reference in New Issue
Block a user