- comment out some logs to test if we loose some lines when drawing rapidly
This commit is contained in:
parent
3609d409df
commit
c97f806154
@ -114,12 +114,12 @@ package org.bigbluebutton.main.model.users
|
||||
}
|
||||
|
||||
public function onMessageFromServer(messageName:String, result:Object):void {
|
||||
LogUtil.debug("Got message from server [" + messageName + "]");
|
||||
// LogUtil.debug("Got message from server [" + messageName + "]");
|
||||
notifyListeners(messageName, result);
|
||||
}
|
||||
|
||||
public function sendMessage(service:String, onSuccess:Function, onFailure:Function, message:Object=null):void {
|
||||
LogUtil.debug("SENDING [" + service + "]");
|
||||
// LogUtil.debug("SENDING [" + service + "]");
|
||||
var responder:Responder = new Responder(
|
||||
function(result:Object):void { // On successful result
|
||||
onSuccess("Successfully sent [" + service + "].");
|
||||
|
@ -127,13 +127,13 @@ package org.bigbluebutton.modules.whiteboard
|
||||
}
|
||||
|
||||
private function addNewShape(o:DrawObject):void {
|
||||
LogUtil.debug("Adding new shape [" + o.getType() + "," + o.getGraphicID() + "," + o.status + "]");
|
||||
// LogUtil.debug("Adding new shape [" + o.getType() + "," + o.getGraphicID() + "," + o.status + "]");
|
||||
if (o.getType() == DrawObject.TEXT) return;
|
||||
|
||||
var dobj:DrawObject = shapeFactory.makeShape(o);
|
||||
LogUtil.debug("Adding new shape 1 [" + dobj.getType() + "," + dobj.getGraphicID() + "," + dobj.status + "]");
|
||||
// LogUtil.debug("Adding new shape 1 [" + dobj.getType() + "," + dobj.getGraphicID() + "," + dobj.status + "]");
|
||||
wbCanvas.addGraphic(dobj);
|
||||
LogUtil.debug("Adding new shape 2 [" + dobj.getGraphicID() + ", [" + dobj.x + "," + dobj.y + "]");
|
||||
// LogUtil.debug("Adding new shape 2 [" + dobj.getGraphicID() + ", [" + dobj.x + "," + dobj.y + "]");
|
||||
/*
|
||||
var points:String = "{type=" + dobj.getType() + ",points=";
|
||||
for (var p:int = 0; p < dobj.getShapeArray().length; p++) {
|
||||
@ -151,7 +151,7 @@ package org.bigbluebutton.modules.whiteboard
|
||||
var tobj:TextObject = shapeFactory.makeTextObject(o);
|
||||
tobj.setGraphicID(o.id);
|
||||
tobj.status = o.status;
|
||||
LogUtil.debug("Created text object [" + tobj.getGraphicID() + "] in [" + tobj.text + "," + tobj.x + "," + tobj.y + "," + tobj.textSize + "]");
|
||||
// LogUtil.debug("Created text object [" + tobj.getGraphicID() + "] in [" + tobj.text + "," + tobj.x + "," + tobj.y + "," + tobj.textSize + "]");
|
||||
return tobj;
|
||||
}
|
||||
|
||||
@ -164,7 +164,7 @@ package org.bigbluebutton.modules.whiteboard
|
||||
tobj.wordWrap = false;
|
||||
tobj.autoSize = TextFieldAutoSize.LEFT;
|
||||
tobj.makeEditable(true);
|
||||
LogUtil.debug("Putting text object [" + tobj.getGraphicID() + "] in [" + tobj.x + "," + tobj.y + "]");
|
||||
// LogUtil.debug("Putting text object [" + tobj.getGraphicID() + "] in [" + tobj.x + "," + tobj.y + "]");
|
||||
tobj.registerListeners(textObjGainedFocusListener, textObjLostFocusListener, textObjTextListener, textObjSpecialListener);
|
||||
wbCanvas.addGraphic(tobj);
|
||||
wbCanvas.stage.focus = tobj;
|
||||
@ -192,7 +192,7 @@ package org.bigbluebutton.modules.whiteboard
|
||||
var tobj:TextObject = calibrateNewTextWith(o);
|
||||
var id:String = tobj.getGraphicID();
|
||||
removeText(id);
|
||||
LogUtil.debug("Text modified to " + tobj.text);
|
||||
// LogUtil.debug("Text modified to " + tobj.text);
|
||||
addNormalText(o);
|
||||
}
|
||||
|
||||
@ -416,7 +416,7 @@ package org.bigbluebutton.modules.whiteboard
|
||||
}
|
||||
|
||||
public function textObjGainedFocusListener(event:FocusEvent):void {
|
||||
LogUtil.debug("### GAINED FOCUS ");
|
||||
// LogUtil.debug("### GAINED FOCUS ");
|
||||
var tf:TextObject = event.currentTarget as TextObject;
|
||||
wbCanvas.stage.focus = tf;
|
||||
tf.stage.focus = tf;
|
||||
@ -427,10 +427,10 @@ package org.bigbluebutton.modules.whiteboard
|
||||
}
|
||||
|
||||
public function textObjLostFocusListener(event:FocusEvent):void {
|
||||
LogUtil.debug("### LOST FOCUS ");
|
||||
// LogUtil.debug("### LOST FOCUS ");
|
||||
var tf:TextObject = event.target as TextObject;
|
||||
sendTextToServer(TextObject.TEXT_PUBLISHED, tf);
|
||||
LogUtil.debug("Text published to: " + tf.text);
|
||||
// LogUtil.debug("Text published to: " + tf.text);
|
||||
currentlySelectedTextObject = null;
|
||||
var e:GraphicObjectFocusEvent = new GraphicObjectFocusEvent(GraphicObjectFocusEvent.OBJECT_DESELECTED);
|
||||
e.data = tf;
|
||||
@ -451,7 +451,7 @@ package org.bigbluebutton.modules.whiteboard
|
||||
break;
|
||||
}
|
||||
|
||||
LogUtil.debug("SENDING TEXT: [" + tobj.text + "]");
|
||||
// LogUtil.debug("SENDING TEXT: [" + tobj.text + "]");
|
||||
|
||||
var annotation:Object = new Object();
|
||||
annotation["type"] = "text";
|
||||
|
@ -22,7 +22,7 @@ package org.bigbluebutton.modules.whiteboard.services
|
||||
}
|
||||
|
||||
public function onMessage(messageName:String, message:Object):void {
|
||||
LogUtil.debug("WB: received message " + messageName);
|
||||
// LogUtil.debug("WB: received message " + messageName);
|
||||
|
||||
switch (messageName) {
|
||||
case "WhiteboardRequestAnnotationHistoryReply":
|
||||
@ -55,34 +55,34 @@ package org.bigbluebutton.modules.whiteboard.services
|
||||
}
|
||||
|
||||
private function handleChangePresentationCommand(message:Object):void {
|
||||
LogUtil.debug("Handle Whiteboard Change Presentation Command [ " + message.presentationID + ", " + message.numberOfPages + "]");
|
||||
// LogUtil.debug("Handle Whiteboard Change Presentation Command [ " + message.presentationID + ", " + message.numberOfPages + "]");
|
||||
whiteboardModel.changePresentation(message.presentationID, message.numberOfPages);
|
||||
}
|
||||
|
||||
private function handleChangePageCommand(message:Object):void {
|
||||
LogUtil.debug("Handle Whiteboard Change Page Command [ " + message.pageNum + ", " + message.numAnnotations + "]");
|
||||
// LogUtil.debug("Handle Whiteboard Change Page Command [ " + message.pageNum + ", " + message.numAnnotations + "]");
|
||||
whiteboardModel.changePage(message.pageNum, message.numAnnotations);
|
||||
}
|
||||
|
||||
private function handleClearCommand(message:Object):void {
|
||||
LogUtil.debug("Handle Whiteboard Clear Command ");
|
||||
// LogUtil.debug("Handle Whiteboard Clear Command ");
|
||||
whiteboardModel.clear();
|
||||
}
|
||||
|
||||
private function handleUndoCommand(message:Object):void {
|
||||
LogUtil.debug("Handle Whiteboard Undo Command ");
|
||||
// LogUtil.debug("Handle Whiteboard Undo Command ");
|
||||
whiteboardModel.undo();
|
||||
// dispatcher.dispatchEvent(new WhiteboardUpdate(WhiteboardUpdate.SHAPE_UNDONE));
|
||||
}
|
||||
|
||||
private function handleEnableWhiteboardCommand(message:Object):void {
|
||||
//if (result as Boolean) modifyEnabledCallback(true);
|
||||
LogUtil.debug("Handle Whiteboard Enabled Command " + message.enabled);
|
||||
// LogUtil.debug("Handle Whiteboard Enabled Command " + message.enabled);
|
||||
whiteboardModel.enable(message.enabled);
|
||||
}
|
||||
|
||||
private function handleNewAnnotationCommand(message:Object):void {
|
||||
LogUtil.debug("Handle new annotation[" + message.type + ", " + message.id + ", " + message.status + "]");
|
||||
// LogUtil.debug("Handle new annotation[" + message.type + ", " + message.id + ", " + message.status + "]");
|
||||
if (message.type == undefined || message.type == null || message.type == "") return;
|
||||
if (message.id == undefined || message.id == null || message.id == "") return;
|
||||
if (message.status == undefined || message.status == null || message.status == "") return;
|
||||
@ -101,7 +101,7 @@ package org.bigbluebutton.modules.whiteboard.services
|
||||
if (message.count == 0) {
|
||||
LogUtil.debug("handleRequestAnnotationHistoryReply: No annotations.");
|
||||
} else {
|
||||
LogUtil.debug("handleRequestAnnotationHistoryReply: Number of annotations in history = " + message.count);
|
||||
// LogUtil.debug("handleRequestAnnotationHistoryReply: Number of annotations in history = " + message.count);
|
||||
var annotations:Array = message.annotations as Array;
|
||||
var tempAnnotations:Array = new Array();
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
package org.bigbluebutton.modules.whiteboard.services
|
||||
{
|
||||
import flash.net.NetConnection;
|
||||
import flash.net.Responder;
|
||||
|
||||
import flash.net.Responder;
|
||||
import org.bigbluebutton.common.LogUtil;
|
||||
import org.bigbluebutton.core.BBB;
|
||||
import org.bigbluebutton.core.managers.ConnectionManager;
|
||||
@ -16,7 +15,7 @@ package org.bigbluebutton.modules.whiteboard.services
|
||||
public class MessageSender
|
||||
{
|
||||
public function changePage(e:PageEvent):void{
|
||||
LogUtil.debug("Sending [whiteboard.setActivePage] to server.");
|
||||
// LogUtil.debug("Sending [whiteboard.setActivePage] to server.");
|
||||
var message:Object = new Object();
|
||||
message["pageNum"] = e.pageNum;
|
||||
|
||||
@ -33,7 +32,7 @@ package org.bigbluebutton.modules.whiteboard.services
|
||||
}
|
||||
|
||||
public function modifyEnabled(e:WhiteboardPresenterEvent):void {
|
||||
LogUtil.debug("Sending [whiteboard.enableWhiteboard] to server.");
|
||||
// LogUtil.debug("Sending [whiteboard.enableWhiteboard] to server.");
|
||||
var message:Object = new Object();
|
||||
message["enabled"] = e.enabled;
|
||||
|
||||
@ -54,7 +53,7 @@ package org.bigbluebutton.modules.whiteboard.services
|
||||
*
|
||||
*/
|
||||
public function toggleGrid():void{
|
||||
LogUtil.debug("Sending [whiteboard.toggleGrid] to server.");
|
||||
// LogUtil.debug("Sending [whiteboard.toggleGrid] to server.");
|
||||
var _nc:ConnectionManager = BBB.initConnectionManager();
|
||||
_nc.sendMessage("whiteboard.toggleGrid",
|
||||
function(result:String):void { // On successful result
|
||||
@ -71,7 +70,7 @@ package org.bigbluebutton.modules.whiteboard.services
|
||||
*
|
||||
*/
|
||||
public function undoGraphic():void{
|
||||
LogUtil.debug("Sending [whiteboard.undo] to server.");
|
||||
// LogUtil.debug("Sending [whiteboard.undo] to server.");
|
||||
var _nc:ConnectionManager = BBB.initConnectionManager();
|
||||
_nc.sendMessage("whiteboard.undo",
|
||||
function(result:String):void { // On successful result
|
||||
@ -88,7 +87,7 @@ package org.bigbluebutton.modules.whiteboard.services
|
||||
*
|
||||
*/
|
||||
public function clearBoard():void{
|
||||
LogUtil.debug("Sending [whiteboard.clear] to server.");
|
||||
// LogUtil.debug("Sending [whiteboard.clear] to server.");
|
||||
var _nc:ConnectionManager = BBB.initConnectionManager();
|
||||
_nc.sendMessage("whiteboard.clear",
|
||||
function(result:String):void { // On successful result
|
||||
@ -101,7 +100,7 @@ package org.bigbluebutton.modules.whiteboard.services
|
||||
}
|
||||
|
||||
public function requestAnnotationHistory():void{
|
||||
LogUtil.debug("Sending [whiteboard.requestAnnotationHistory] to server.");
|
||||
// LogUtil.debug("Sending [whiteboard.requestAnnotationHistory] to server.");
|
||||
var _nc:ConnectionManager = BBB.initConnectionManager();
|
||||
_nc.sendMessage("whiteboard.requestAnnotationHistory",
|
||||
function(result:String):void { // On successful result
|
||||
@ -119,7 +118,7 @@ package org.bigbluebutton.modules.whiteboard.services
|
||||
*
|
||||
*/
|
||||
public function sendText(e:WhiteboardDrawEvent):void{
|
||||
LogUtil.debug("Sending [whiteboard.sendAnnotation] (TEXT) to server.");
|
||||
// LogUtil.debug("Sending [whiteboard.sendAnnotation] (TEXT) to server.");
|
||||
var _nc:ConnectionManager = BBB.initConnectionManager();
|
||||
_nc.sendMessage("whiteboard.sendAnnotation",
|
||||
function(result:String):void { // On successful result
|
||||
@ -138,7 +137,7 @@ package org.bigbluebutton.modules.whiteboard.services
|
||||
*
|
||||
*/
|
||||
public function sendShape(e:WhiteboardDrawEvent):void {
|
||||
LogUtil.debug("Sending [whiteboard.sendAnnotation] (SHAPE) to server.");
|
||||
// LogUtil.debug("Sending [whiteboard.sendAnnotation] (SHAPE) to server.");
|
||||
|
||||
var _nc:ConnectionManager = BBB.initConnectionManager();
|
||||
_nc.sendMessage("whiteboard.sendAnnotation",
|
||||
@ -153,7 +152,7 @@ package org.bigbluebutton.modules.whiteboard.services
|
||||
}
|
||||
|
||||
public function checkIsWhiteboardOn():void {
|
||||
LogUtil.debug("Sending [whiteboard.isWhiteboardEnabled] to server.");
|
||||
// LogUtil.debug("Sending [whiteboard.isWhiteboardEnabled] to server.");
|
||||
var _nc:ConnectionManager = BBB.initConnectionManager();
|
||||
_nc.sendMessage("whiteboard.isWhiteboardEnabled",
|
||||
function(result:String):void { // On successful result
|
||||
@ -166,7 +165,7 @@ package org.bigbluebutton.modules.whiteboard.services
|
||||
}
|
||||
|
||||
public function setActivePresentation(e:PresentationEvent):void{
|
||||
LogUtil.debug("Sending [whiteboard.isWhiteboardEnabled] to server.");
|
||||
// LogUtil.debug("Sending [whiteboard.isWhiteboardEnabled] to server.");
|
||||
|
||||
var message:Object = new Object();
|
||||
message["presentationID"] = e.presentationName;
|
||||
|
Loading…
Reference in New Issue
Block a user