fixed bug 1661, the tool now switches to pan/zoom when a new presentation is loaded

This commit is contained in:
Chad Pilkey 2013-10-18 18:36:34 -07:00
parent 38f8ed5741
commit c5a5a5d77c
2 changed files with 17 additions and 0 deletions

View File

@ -29,8 +29,10 @@ package org.bigbluebutton.modules.whiteboard.managers
import org.bigbluebutton.main.model.users.Conference;
import org.bigbluebutton.modules.present.api.PresentationAPI;
import org.bigbluebutton.modules.present.events.AddOverlayCanvasEvent;
import org.bigbluebutton.modules.present.events.UploadEvent;
import org.bigbluebutton.modules.whiteboard.WhiteboardCanvasDisplayModel;
import org.bigbluebutton.modules.whiteboard.WhiteboardCanvasModel;
import org.bigbluebutton.modules.whiteboard.business.shapes.WhiteboardConstants;
import org.bigbluebutton.modules.whiteboard.events.PageEvent;
import org.bigbluebutton.modules.whiteboard.events.ToggleGridEvent;
import org.bigbluebutton.modules.whiteboard.events.WhiteboardButtonEvent;
@ -136,5 +138,15 @@ package org.bigbluebutton.modules.whiteboard.managers
public function disableWhiteboard(e:WhiteboardButtonEvent):void {
highlighterCanvas.disableWhiteboard(e);
}
/*
* When a presentation loads switch the tool to pan and zoom to avoid a race condition
* with drawing on a half loaded slide.
*/
public function handlePresentationLoading(e:UploadEvent):void {
var event:WhiteboardButtonEvent = new WhiteboardButtonEvent(WhiteboardButtonEvent.WHITEBOARD_BUTTON_PRESSED);
event.graphicType = WhiteboardConstants.TYPE_ZOOM;
globalDispatcher.dispatchEvent(event);
}
}
}

View File

@ -28,6 +28,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import org.bigbluebutton.modules.present.events.NavigationEvent;
import org.bigbluebutton.modules.present.events.PresentationEvent;
import org.bigbluebutton.modules.present.events.WindowResizedEvent;
import org.bigbluebutton.modules.present.events.UploadEvent;
import org.bigbluebutton.modules.whiteboard.events.PageEvent;
import org.bigbluebutton.modules.whiteboard.events.StartWhiteboardModuleEvent;
import org.bigbluebutton.modules.whiteboard.events.ToggleGridEvent;
@ -114,6 +115,10 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<EventHandlers type="{WhiteboardButtonEvent.DISABLE_WHITEBOARD}" >
<MethodInvoker generator="{WhiteboardManager}" method="disableWhiteboard" arguments="{event}" />
</EventHandlers>
<EventHandlers type="{UploadEvent.PRESENTATION_READY}" >
<MethodInvoker generator="{WhiteboardManager}" method="handlePresentationLoading" arguments="{event}" />
</EventHandlers>
<Injectors target="{WhiteboardManager}">
<ObjectBuilder generator="{WhiteboardModel}" cache="global" constructorArguments="{scope.dispatcher}"/>