- query for annotations when loading new page

This commit is contained in:
Richard Alam 2012-07-31 17:09:20 +00:00
parent 8d931eb94a
commit 3609d409df
2 changed files with 13 additions and 9 deletions

View File

@ -307,14 +307,18 @@ package org.bigbluebutton.modules.whiteboard
clearBoard();
var annotations:Array = whiteboardModel.getAnnotations();
// LogUtil.debug("**** CanvasDisplay changePage [" + annotations.length + "] *****");
for (var i:int = 0; i < annotations.length; i++) {
var an:Annotation = annotations[i] as Annotation;
// LogUtil.debug("**** Drawing graphic from changePage [" + an.type + "] *****");
if(an.type != "text") {
var dobj:DrawObject = drawObjectFactory(an.annotation);
drawShape(dobj, true);
} else {
drawText(an, true);
if (annotations.length == 0) {
wbCanvas.queryForAnnotationHistory();
} else {
for (var i:int = 0; i < annotations.length; i++) {
var an:Annotation = annotations[i] as Annotation;
// LogUtil.debug("**** Drawing graphic from changePage [" + an.type + "] *****");
if(an.type != "text") {
var dobj:DrawObject = drawObjectFactory(an.annotation);
drawShape(dobj, true);
} else {
drawText(an, true);
}
}
}
}

View File

@ -70,7 +70,7 @@
queryForAnnotationHistory();
}
private function queryForAnnotationHistory():void {
public function queryForAnnotationHistory():void {
var dispatcher:Dispatcher = new Dispatcher();
dispatcher.dispatchEvent(new WhiteboardDrawEvent(WhiteboardDrawEvent.GET_ANNOTATION_HISTORY));
}