Merge pull request #5896 from riadvice/pen-muw

Fix pen only multi-user whiteboard  and make it work for late joiners
This commit is contained in:
Fred Dixon 2018-07-22 06:53:21 -06:00 committed by GitHub
commit f536467879
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 7 deletions

View File

@ -26,8 +26,6 @@ package org.bigbluebutton.modules.whiteboard.views {
import flash.events.MouseEvent;
import flash.geom.Point;
import melomel.core.UI;
import mx.containers.Canvas;
import mx.core.IChildList;
import mx.managers.CursorManager;

View File

@ -60,6 +60,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import org.bigbluebutton.modules.whiteboard.events.StopWhiteboardModuleEvent;
import org.bigbluebutton.modules.whiteboard.events.WhiteboardAccessEvent;
import org.bigbluebutton.modules.whiteboard.events.WhiteboardButtonEvent;
import org.bigbluebutton.modules.whiteboard.models.AnnotationType;
import org.bigbluebutton.modules.whiteboard.views.models.WhiteboardOptions;
import org.bigbluebutton.util.i18n.ResourceUtil;
@ -96,9 +97,13 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
changeThickness();
changeColor();
}
penOnlyMultiUser();
}
public function setCanvas(c:WhiteboardCanvas):void {
wbOptions = Options.getOptions(WhiteboardOptions) as WhiteboardOptions;
canvas = c;
if (cpik) {
@ -199,7 +204,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
}
public function positionToolbar(container:MDIWindow):void {
wbOptions = Options.getOptions(WhiteboardOptions) as WhiteboardOptions;
LOGGER.debug("Positioning whiteboard toolbar");
containerToOverlay = container;
containerToOverlay.addEventListener(MoveEvent.MOVE, setPositionAndDepth);
@ -229,10 +233,12 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
} else {
hideToolbar();
}
if (multiUser && wbOptions.onlyPenMUW) {
scribbleBtn.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
} else if (!multiUser) {
penOnlyMultiUser();
}
private function penOnlyMultiUser() : void {
if (multiUser && wbOptions.onlyPenMUW && !isPresenter) {
setToolType(WhiteboardConstants.TYPE_SHAPE, AnnotationType.PENCIL);
}
}