From 8edfe1037fb19951bd99acb09c1ce5c88cd140a5 Mon Sep 17 00:00:00 2001 From: Chad Pilkey Date: Wed, 15 Nov 2017 18:07:48 -0500 Subject: [PATCH] initialize whiteboard canvas with current presenter id --- .../present/ui/views/PresentationWindow.mxml | 9 ++++++- .../modules/present/ui/views/SlideView.mxml | 26 ++++++++----------- .../whiteboard/views/WhiteboardToolbar.mxml | 5 +++- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PresentationWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PresentationWindow.mxml index f8febd6de3..11122e3efd 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PresentationWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PresentationWindow.mxml @@ -308,6 +308,11 @@ with BigBlueButton; if not, see . becomePresenter(); } + //send new presenter to the whiteboard canvas + if (whiteboardOverlay != null) { + whiteboardOverlay.presenterChange(amITheCurrentPodPresenter(), currentPresenterInPod); + } + populatePodDropdown(); } @@ -651,7 +656,9 @@ with BigBlueButton; if not, see . if(whiteboardOverlay != null) { LOGGER.debug("addWhiteboardCanvasToSlideView: Adding whiteboard canvas to SlideView"); slideView.acceptOverlayCanvas(this.podId, whiteboardOverlay); - } + + whiteboardOverlay.presenterChange(amITheCurrentPodPresenter(), currentPresenterInPod); + } } override protected function resourcesChanged():void{ diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/SlideView.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/SlideView.mxml index 8e18ad1f4b..9c75bcf43b 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/SlideView.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/SlideView.mxml @@ -367,19 +367,18 @@ with BigBlueButton; if not, see . private function amITheCurrentPodPresenter(): Boolean { 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 { // need to calculate slide zoom percentage left by a previous presenter /** @@ -391,9 +390,6 @@ with BigBlueButton; if not, see . addEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheelZoomEvent); this.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown); notifyOthersOfZoomEvent(); - if (whiteboardCanvas != null) { - whiteboardCanvas.presenterChange(amIThePresenterInThePod, currentPresenterInPod); - } } private function noSlideContentLoaded():Boolean { diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/WhiteboardToolbar.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/WhiteboardToolbar.mxml index b37fcc7d8f..7fc349d6bb 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/WhiteboardToolbar.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/WhiteboardToolbar.mxml @@ -169,7 +169,10 @@ with BigBlueButton; if not, see . public function presenterChange(amIPresenter:Boolean): void { this.isPresenter = amIPresenter; - multiUserBtn.enabled = multiUserBtn.visible = multiUserBtn.includeInLayout = amIPresenter; + + if (multiUserBtn != null) { + multiUserBtn.enabled = multiUserBtn.visible = multiUserBtn.includeInLayout = amIPresenter; + } checkVisibility(); if (!amIPresenter) {