- fix issue where when switching presenter while multi-user whiteboard is on, the cursors
for other users appears instead of just the presenter's cursor.
This commit is contained in:
parent
13b6dc065e
commit
3e0701a0ae
@ -3,6 +3,7 @@ package org.bigbluebutton.core.model
|
||||
import org.bigbluebutton.core.model.users.GuestsApp;
|
||||
import org.bigbluebutton.core.model.users.Users2x;
|
||||
import org.bigbluebutton.core.model.users.VoiceUsers2x;
|
||||
import org.bigbluebutton.modules.whiteboard.models.WhiteboardModel;
|
||||
|
||||
public class LiveMeeting
|
||||
{
|
||||
@ -19,6 +20,7 @@ package org.bigbluebutton.core.model
|
||||
public var sharedNotes: SharedNotes = new SharedNotes();
|
||||
|
||||
public var breakoutRooms: BreakoutRooms = new BreakoutRooms();
|
||||
public var whiteboardModel: WhiteboardModel = new WhiteboardModel();
|
||||
|
||||
public function LiveMeeting(enforcer: LiveMeetingSingletonEnforcer)
|
||||
{
|
||||
|
@ -166,7 +166,7 @@ package org.bigbluebutton.main.model.users
|
||||
messageName != "BreakoutRoomsTimeRemainingUpdateEvtMsg" &&
|
||||
messageName != "UserTalkingVoiceEvtMsg" &&
|
||||
messageName != "MeetingTimeRemainingUpdateEvtMsg") {
|
||||
LOGGER.debug("onMessageFromServer2x - " + msg);
|
||||
// LOGGER.debug("onMessageFromServer2x - " + msg);
|
||||
}
|
||||
|
||||
var map:Object = JSON.parse(msg);
|
||||
|
@ -19,7 +19,6 @@
|
||||
package org.bigbluebutton.modules.whiteboard.business.shapes
|
||||
{
|
||||
import org.bigbluebutton.modules.whiteboard.models.Annotation;
|
||||
import org.bigbluebutton.modules.whiteboard.models.WhiteboardModel;
|
||||
|
||||
public class DrawAnnotation implements IDrawAnnotation
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ package org.bigbluebutton.modules.whiteboard.business.shapes
|
||||
{
|
||||
import org.bigbluebutton.modules.whiteboard.models.Annotation;
|
||||
import org.bigbluebutton.modules.whiteboard.models.AnnotationType;
|
||||
import org.bigbluebutton.modules.whiteboard.models.WhiteboardModel;
|
||||
|
||||
public class EllipseAnnotation extends DrawAnnotation
|
||||
{
|
||||
|
@ -19,7 +19,6 @@
|
||||
package org.bigbluebutton.modules.whiteboard.business.shapes
|
||||
{
|
||||
import org.bigbluebutton.modules.whiteboard.models.Annotation;
|
||||
import org.bigbluebutton.modules.whiteboard.models.WhiteboardModel;
|
||||
|
||||
public interface IDrawAnnotation
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ package org.bigbluebutton.modules.whiteboard.business.shapes
|
||||
{
|
||||
import org.bigbluebutton.modules.whiteboard.models.Annotation;
|
||||
import org.bigbluebutton.modules.whiteboard.models.AnnotationType;
|
||||
import org.bigbluebutton.modules.whiteboard.models.WhiteboardModel;
|
||||
|
||||
public class LineAnnotation extends DrawAnnotation
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ package org.bigbluebutton.modules.whiteboard.business.shapes
|
||||
{
|
||||
import org.bigbluebutton.modules.whiteboard.models.Annotation;
|
||||
import org.bigbluebutton.modules.whiteboard.models.AnnotationType;
|
||||
import org.bigbluebutton.modules.whiteboard.models.WhiteboardModel;
|
||||
|
||||
public class PencilDrawAnnotation extends DrawAnnotation
|
||||
{
|
||||
|
@ -20,7 +20,6 @@ package org.bigbluebutton.modules.whiteboard.business.shapes
|
||||
{
|
||||
import org.bigbluebutton.modules.whiteboard.models.Annotation;
|
||||
import org.bigbluebutton.modules.whiteboard.models.AnnotationType;
|
||||
import org.bigbluebutton.modules.whiteboard.models.WhiteboardModel;
|
||||
|
||||
public class RectangleAnnotation extends DrawAnnotation
|
||||
{
|
||||
|
@ -20,8 +20,7 @@ package org.bigbluebutton.modules.whiteboard.business.shapes
|
||||
{
|
||||
import org.bigbluebutton.modules.whiteboard.models.Annotation;
|
||||
import org.bigbluebutton.modules.whiteboard.models.AnnotationType;
|
||||
import org.bigbluebutton.modules.whiteboard.models.WhiteboardModel;
|
||||
|
||||
|
||||
public class TextDrawAnnotation extends DrawAnnotation
|
||||
{
|
||||
private var _type:String = AnnotationType.TEXT;
|
||||
|
@ -20,7 +20,6 @@ package org.bigbluebutton.modules.whiteboard.business.shapes
|
||||
{
|
||||
import org.bigbluebutton.modules.whiteboard.models.Annotation;
|
||||
import org.bigbluebutton.modules.whiteboard.models.AnnotationType;
|
||||
import org.bigbluebutton.modules.whiteboard.models.WhiteboardModel;
|
||||
|
||||
public class TriangleAnnotation extends DrawAnnotation
|
||||
{
|
||||
|
@ -22,22 +22,15 @@ package org.bigbluebutton.modules.whiteboard.managers
|
||||
|
||||
import org.as3commons.logging.api.ILogger;
|
||||
import org.as3commons.logging.api.getClassLogger;
|
||||
import org.bigbluebutton.core.model.LiveMeeting;
|
||||
import org.bigbluebutton.modules.whiteboard.commands.GetWhiteboardAccessCommand;
|
||||
import org.bigbluebutton.modules.whiteboard.events.RequestNewCanvasEvent;
|
||||
import org.bigbluebutton.modules.whiteboard.models.WhiteboardModel;
|
||||
import org.bigbluebutton.modules.whiteboard.views.WhiteboardCanvas;
|
||||
|
||||
public class WhiteboardManager
|
||||
{
|
||||
private static const LOGGER:ILogger = getClassLogger(WhiteboardManager);
|
||||
|
||||
/* Injected by Mate */
|
||||
public var whiteboardModel:WhiteboardModel;
|
||||
|
||||
public function WhiteboardManager() {
|
||||
|
||||
}
|
||||
|
||||
public function handleStartModuleEvent():void {
|
||||
|
||||
var dispatcher:Dispatcher = new Dispatcher();
|
||||
@ -45,13 +38,13 @@ package org.bigbluebutton.modules.whiteboard.managers
|
||||
}
|
||||
|
||||
public function handleRequestNewCanvas(e:RequestNewCanvasEvent):void {
|
||||
var whiteboardCanvas:WhiteboardCanvas = new WhiteboardCanvas(whiteboardModel);
|
||||
var whiteboardCanvas:WhiteboardCanvas = new WhiteboardCanvas(LiveMeeting.inst().whiteboardModel);
|
||||
whiteboardCanvas.attachToReceivingObject(e.receivingObject);
|
||||
}
|
||||
|
||||
public function removeAnnotationsHistory():void {
|
||||
// it will dispatch the cleanAnnotations in the displayModel later
|
||||
whiteboardModel.clearAll();
|
||||
LiveMeeting.inst().whiteboardModel.clearAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -89,19 +89,14 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
</EventHandlers>
|
||||
|
||||
<Injectors target="{WhiteboardManager}">
|
||||
<ObjectBuilder generator="{WhiteboardModel}" cache="global" constructorArguments="{scope.dispatcher}"/>
|
||||
<PropertyInjector targetKey="whiteboardModel" source="{WhiteboardModel}"/>
|
||||
</Injectors>
|
||||
|
||||
<Injectors target="{WhiteboardService}">
|
||||
<PropertyInjector targetKey="receiver" source="{MessageReceiver}"/>
|
||||
<PropertyInjector targetKey="sender" source="{MessageSender}"/>
|
||||
<PropertyInjector targetKey="whiteboardModel" source="{WhiteboardModel}"/>
|
||||
</Injectors>
|
||||
|
||||
<Injectors target="{MessageReceiver}">
|
||||
<ObjectBuilder generator="{WhiteboardModel}" cache="global" constructorArguments="{scope.dispatcher}"/>
|
||||
<PropertyInjector targetKey="whiteboardModel" source="{WhiteboardModel}"/>
|
||||
</Injectors>
|
||||
</fx:Declarations>
|
||||
</EventMap>
|
||||
|
@ -18,21 +18,18 @@
|
||||
*/
|
||||
package org.bigbluebutton.modules.whiteboard.models
|
||||
{
|
||||
|
||||
import com.asfusion.mate.events.Dispatcher;
|
||||
|
||||
import flash.events.EventDispatcher;
|
||||
import flash.events.IEventDispatcher;
|
||||
|
||||
import mx.collections.ArrayCollection;
|
||||
|
||||
import org.as3commons.logging.api.ILogger;
|
||||
import org.as3commons.logging.api.getClassLogger;
|
||||
import org.bigbluebutton.core.UsersUtil;
|
||||
import org.bigbluebutton.modules.present.model.Page;
|
||||
import org.bigbluebutton.modules.present.model.PresentationModel;
|
||||
import org.bigbluebutton.modules.whiteboard.business.shapes.DrawObject;
|
||||
import org.bigbluebutton.modules.whiteboard.commands.GetWhiteboardShapesCommand;
|
||||
import org.bigbluebutton.modules.whiteboard.events.WhiteboardAccessEvent;
|
||||
import org.bigbluebutton.modules.whiteboard.events.WhiteboardCursorEvent;
|
||||
import org.bigbluebutton.modules.whiteboard.events.WhiteboardDrawEvent;
|
||||
import org.bigbluebutton.modules.whiteboard.events.WhiteboardUpdateReceived;
|
||||
|
||||
public class WhiteboardModel extends EventDispatcher
|
||||
@ -42,12 +39,9 @@ package org.bigbluebutton.modules.whiteboard.models
|
||||
|
||||
private var _multiUser:Boolean = false;
|
||||
|
||||
private var _dispatcher:IEventDispatcher;
|
||||
|
||||
public function WhiteboardModel(dispatcher:IEventDispatcher) {
|
||||
_dispatcher = dispatcher;
|
||||
}
|
||||
|
||||
public var _dispatcher:Dispatcher = new Dispatcher();
|
||||
|
||||
|
||||
private function getWhiteboard(id:String, requestHistory:Boolean=true):Whiteboard {
|
||||
var wb:Whiteboard;
|
||||
|
||||
@ -113,7 +107,7 @@ package org.bigbluebutton.modules.whiteboard.models
|
||||
if (removedAnnotation != null) {
|
||||
var e:WhiteboardUpdateReceived = new WhiteboardUpdateReceived(WhiteboardUpdateReceived.UNDO_ANNOTATION);
|
||||
e.annotation = removedAnnotation;
|
||||
dispatchEvent(e);
|
||||
dispatchEvent(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,18 +21,14 @@ package org.bigbluebutton.modules.whiteboard.services
|
||||
import org.as3commons.logging.api.ILogger;
|
||||
import org.as3commons.logging.api.getClassLogger;
|
||||
import org.bigbluebutton.core.BBB;
|
||||
import org.bigbluebutton.core.model.LiveMeeting;
|
||||
import org.bigbluebutton.main.model.users.IMessageListener;
|
||||
import org.bigbluebutton.modules.whiteboard.business.shapes.DrawObject;
|
||||
import org.bigbluebutton.modules.whiteboard.models.Annotation;
|
||||
import org.bigbluebutton.modules.whiteboard.models.WhiteboardModel;
|
||||
|
||||
public class MessageReceiver implements IMessageListener
|
||||
{
|
||||
private static const LOGGER:ILogger = getClassLogger(MessageReceiver);
|
||||
|
||||
/* Injected by Mate */
|
||||
public var whiteboardModel:WhiteboardModel;
|
||||
|
||||
public function MessageReceiver() {
|
||||
BBB.initConnectionManager().addMessageListener(this);
|
||||
}
|
||||
@ -70,22 +66,22 @@ package org.bigbluebutton.modules.whiteboard.services
|
||||
private function handleClearWhiteboardEvtMsg(message:Object):void {
|
||||
if (message.body.hasOwnProperty("whiteboardId") && message.body.hasOwnProperty("fullClear")
|
||||
&& message.body.hasOwnProperty("userId")) {
|
||||
whiteboardModel.clear(message.body.whiteboardId, message.body.fullClear, message.body.userId);
|
||||
LiveMeeting.inst().whiteboardModel.clear(message.body.whiteboardId, message.body.fullClear, message.body.userId);
|
||||
}
|
||||
}
|
||||
|
||||
private function handleUndoWhiteboardEvtMsg(message:Object):void {
|
||||
if (message.body.hasOwnProperty("whiteboardId") && message.body.hasOwnProperty("annotationId")) {
|
||||
whiteboardModel.removeAnnotation(message.body.whiteboardId, message.body.annotationId);
|
||||
LiveMeeting.inst().whiteboardModel.removeAnnotation(message.body.whiteboardId, message.body.annotationId);
|
||||
}
|
||||
}
|
||||
|
||||
private function handleModifyWhiteboardAccessEvtMsg(message:Object):void {
|
||||
whiteboardModel.accessModified(message.body.multiUser);
|
||||
LiveMeeting.inst().whiteboardModel.accessModified(message.body.multiUser);
|
||||
}
|
||||
|
||||
private function handleGetWhiteboardAccessRespMsg(message:Object):void {
|
||||
whiteboardModel.accessModified(message.body.multiUser);
|
||||
LiveMeeting.inst().whiteboardModel.accessModified(message.body.multiUser);
|
||||
}
|
||||
|
||||
private function handleSendWhiteboardAnnotationEvtMsg(message:Object):void {
|
||||
@ -94,7 +90,7 @@ package org.bigbluebutton.modules.whiteboard.services
|
||||
var annotation:Annotation = new Annotation(receivedAnnotation.id, receivedAnnotation.annotationType, receivedAnnotation.annotationInfo);
|
||||
annotation.status = receivedAnnotation.status;
|
||||
annotation.userId = receivedAnnotation.userId;
|
||||
whiteboardModel.addAnnotation(annotation);
|
||||
LiveMeeting.inst().whiteboardModel.addAnnotation(annotation);
|
||||
}
|
||||
|
||||
private function handleGetWhiteboardAnnotationsRespMsg(message:Object):void {
|
||||
@ -110,7 +106,7 @@ package org.bigbluebutton.modules.whiteboard.services
|
||||
tempAnnotations.push(annotation);
|
||||
}
|
||||
|
||||
whiteboardModel.addAnnotationFromHistory(whiteboardId, tempAnnotations);
|
||||
LiveMeeting.inst().whiteboardModel.addAnnotationFromHistory(whiteboardId, tempAnnotations);
|
||||
}
|
||||
|
||||
private function handleSendCursorPositionEvtMsg(message:Object):void {
|
||||
@ -118,7 +114,7 @@ package org.bigbluebutton.modules.whiteboard.services
|
||||
var xPercent:Number = message.body.xPercent as Number;
|
||||
var yPercent:Number = message.body.yPercent as Number;
|
||||
|
||||
whiteboardModel.updateCursorPosition(userId, xPercent, yPercent);
|
||||
LiveMeeting.inst().whiteboardModel.updateCursorPosition(userId, xPercent, yPercent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,6 @@ package org.bigbluebutton.modules.whiteboard.services
|
||||
import org.bigbluebutton.modules.whiteboard.events.WhiteboardAccessEvent;
|
||||
import org.bigbluebutton.modules.whiteboard.events.WhiteboardCursorEvent;
|
||||
import org.bigbluebutton.modules.whiteboard.events.WhiteboardDrawEvent;
|
||||
import org.bigbluebutton.modules.whiteboard.models.WhiteboardModel;
|
||||
|
||||
public class WhiteboardService
|
||||
{
|
||||
@ -32,7 +31,6 @@ package org.bigbluebutton.modules.whiteboard.services
|
||||
|
||||
public var sender:MessageSender;
|
||||
public var receiver:MessageReceiver;
|
||||
public var whiteboardModel:WhiteboardModel;
|
||||
|
||||
public function getAnnotationHistory(cmd:GetWhiteboardShapesCommand):void
|
||||
{
|
||||
|
@ -3,6 +3,8 @@ package org.bigbluebutton.modules.whiteboard.views {
|
||||
import flash.geom.Point;
|
||||
import flash.utils.Timer;
|
||||
|
||||
import org.bigbluebutton.core.UsersUtil;
|
||||
import org.bigbluebutton.core.model.LiveMeeting;
|
||||
import org.bigbluebutton.modules.whiteboard.business.shapes.ShapeFactory;
|
||||
|
||||
public class CursorPositionListener {
|
||||
@ -14,8 +16,6 @@ package org.bigbluebutton.modules.whiteboard.views {
|
||||
private var _lastXPosition:Number;
|
||||
private var _lastYPosition:Number;
|
||||
|
||||
private var _amIPresenter:Boolean;
|
||||
private var _multiUser:Boolean;
|
||||
|
||||
public function CursorPositionListener(wbCanvas:WhiteboardCanvas, shapeFactory:ShapeFactory) {
|
||||
_wbCanvas = wbCanvas;
|
||||
@ -29,17 +29,15 @@ package org.bigbluebutton.modules.whiteboard.views {
|
||||
}
|
||||
|
||||
public function presenterChange(amIPresenter:Boolean):void {
|
||||
_amIPresenter = amIPresenter;
|
||||
verifyTimerState();
|
||||
}
|
||||
|
||||
public function multiUserChange(multiUser:Boolean):void {
|
||||
_multiUser = multiUser;
|
||||
verifyTimerState();
|
||||
}
|
||||
|
||||
private function verifyTimerState():void {
|
||||
if (_amIPresenter || _multiUser) {
|
||||
if (UsersUtil.amIPresenter() || LiveMeeting.inst().whiteboardModel.multiUser) {
|
||||
startTimer();
|
||||
} else {
|
||||
stopTimer();
|
||||
|
@ -21,14 +21,11 @@ package org.bigbluebutton.modules.whiteboard.views
|
||||
import flash.geom.Point;
|
||||
|
||||
import org.bigbluebutton.modules.whiteboard.business.shapes.DrawAnnotation;
|
||||
import org.bigbluebutton.modules.whiteboard.business.shapes.DrawObject;
|
||||
import org.bigbluebutton.modules.whiteboard.business.shapes.ShapeFactory;
|
||||
import org.bigbluebutton.modules.whiteboard.business.shapes.WhiteboardConstants;
|
||||
import org.bigbluebutton.modules.whiteboard.events.WhiteboardDrawEvent;
|
||||
import org.bigbluebutton.modules.whiteboard.models.Annotation;
|
||||
import org.bigbluebutton.modules.whiteboard.models.AnnotationStatus;
|
||||
import org.bigbluebutton.modules.whiteboard.models.AnnotationType;
|
||||
import org.bigbluebutton.modules.whiteboard.models.WhiteboardModel;
|
||||
import org.bigbluebutton.modules.whiteboard.views.models.WhiteboardTool;
|
||||
|
||||
public class PencilDrawListener implements IDrawListener
|
||||
|
@ -17,13 +17,10 @@
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.whiteboard.views {
|
||||
import org.bigbluebutton.modules.whiteboard.business.shapes.DrawObject;
|
||||
import org.bigbluebutton.modules.whiteboard.business.shapes.ShapeFactory;
|
||||
import org.bigbluebutton.modules.whiteboard.business.shapes.TextDrawAnnotation;
|
||||
import org.bigbluebutton.modules.whiteboard.business.shapes.WhiteboardConstants;
|
||||
import org.bigbluebutton.modules.whiteboard.events.WhiteboardDrawEvent;
|
||||
import org.bigbluebutton.modules.whiteboard.models.AnnotationStatus;
|
||||
import org.bigbluebutton.modules.whiteboard.models.WhiteboardModel;
|
||||
import org.bigbluebutton.modules.whiteboard.views.models.WhiteboardTool;
|
||||
|
||||
public class TextDrawListener implements IDrawListener {
|
||||
|
@ -3,16 +3,11 @@ package org.bigbluebutton.modules.whiteboard.views {
|
||||
import flash.events.FocusEvent;
|
||||
import flash.events.KeyboardEvent;
|
||||
import flash.ui.Keyboard;
|
||||
|
||||
import org.bigbluebutton.modules.whiteboard.business.shapes.DrawObject;
|
||||
import org.bigbluebutton.modules.whiteboard.business.shapes.GraphicFactory;
|
||||
import org.bigbluebutton.modules.whiteboard.business.shapes.ShapeFactory;
|
||||
import org.bigbluebutton.modules.whiteboard.business.shapes.TextDrawAnnotation;
|
||||
import org.bigbluebutton.modules.whiteboard.business.shapes.TextObject;
|
||||
import org.bigbluebutton.modules.whiteboard.events.WhiteboardDrawEvent;
|
||||
import org.bigbluebutton.modules.whiteboard.models.Annotation;
|
||||
import org.bigbluebutton.modules.whiteboard.models.AnnotationStatus;
|
||||
import org.bigbluebutton.modules.whiteboard.models.WhiteboardModel;
|
||||
|
||||
public class TextUpdateListener {
|
||||
private var _whiteboardCanvas:WhiteboardCanvas;
|
||||
|
Loading…
Reference in New Issue
Block a user