initialize whiteboard canvas with current presenter id

This commit is contained in:
Chad Pilkey 2017-11-15 18:07:48 -05:00
parent daa72b2008
commit 8edfe1037f
3 changed files with 23 additions and 17 deletions

View File

@ -308,6 +308,11 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
becomePresenter(); becomePresenter();
} }
//send new presenter to the whiteboard canvas
if (whiteboardOverlay != null) {
whiteboardOverlay.presenterChange(amITheCurrentPodPresenter(), currentPresenterInPod);
}
populatePodDropdown(); populatePodDropdown();
} }
@ -651,7 +656,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
if(whiteboardOverlay != null) { if(whiteboardOverlay != null) {
LOGGER.debug("addWhiteboardCanvasToSlideView: Adding whiteboard canvas to SlideView"); LOGGER.debug("addWhiteboardCanvasToSlideView: Adding whiteboard canvas to SlideView");
slideView.acceptOverlayCanvas(this.podId, whiteboardOverlay); slideView.acceptOverlayCanvas(this.podId, whiteboardOverlay);
}
whiteboardOverlay.presenterChange(amITheCurrentPodPresenter(), currentPresenterInPod);
}
} }
override protected function resourcesChanged():void{ override protected function resourcesChanged():void{

View File

@ -367,19 +367,18 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
private function amITheCurrentPodPresenter(): Boolean { private function amITheCurrentPodPresenter(): Boolean {
return UsersUtil.getMyUserID() == this.currentPresenterInPod; return UsersUtil.getMyUserID() == this.currentPresenterInPod;
} }
public function becomeViewer(amIThePresenterInThePod:Boolean, currentPresenterInPod: String):void {
removeEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheelZoomEvent);
this.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
pagePositionBroadcaster.reset();
endDrag();
}
public function becomeViewer(amIThePresenterInThePod:Boolean, currentPresenterInPod: String):void {
removeEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheelZoomEvent);
this.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
if (whiteboardCanvas != null && currentPresenterInPod != null) {
whiteboardCanvas.presenterChange(amIThePresenterInThePod, currentPresenterInPod);
}
pagePositionBroadcaster.reset();
endDrag();
}
public function becomePresenter(amIThePresenterInThePod:Boolean, currentPresenterInPod: String):void { public function becomePresenter(amIThePresenterInThePod:Boolean, currentPresenterInPod: String):void {
// need to calculate slide zoom percentage left by a previous presenter // need to calculate slide zoom percentage left by a previous presenter
/** /**
@ -391,9 +390,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
addEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheelZoomEvent); addEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheelZoomEvent);
this.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown); this.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
notifyOthersOfZoomEvent(); notifyOthersOfZoomEvent();
if (whiteboardCanvas != null) {
whiteboardCanvas.presenterChange(amIThePresenterInThePod, currentPresenterInPod);
}
} }
private function noSlideContentLoaded():Boolean { private function noSlideContentLoaded():Boolean {

View File

@ -169,7 +169,10 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
public function presenterChange(amIPresenter:Boolean): void { public function presenterChange(amIPresenter:Boolean): void {
this.isPresenter = amIPresenter; this.isPresenter = amIPresenter;
multiUserBtn.enabled = multiUserBtn.visible = multiUserBtn.includeInLayout = amIPresenter;
if (multiUserBtn != null) {
multiUserBtn.enabled = multiUserBtn.visible = multiUserBtn.includeInLayout = amIPresenter;
}
checkVisibility(); checkVisibility();
if (!amIPresenter) { if (!amIPresenter) {