Merge pull request #3779 from riadvice/whiteboard-text-tool-update
Improve user experience for whiteboard text tool
This commit is contained in:
commit
73ab3d360e
@ -70,11 +70,15 @@ package org.bigbluebutton.modules.whiteboard
|
||||
* Check if the presenter is starting a new text annotation without committing the last one.
|
||||
* If so, publish the last text annotation.
|
||||
*/
|
||||
if (currentlySelectedTextObject != null && currentlySelectedTextObject.status != TextObject.TEXT_PUBLISHED) {
|
||||
if (needToPublish()) {
|
||||
sendTextToServer(TextObject.TEXT_PUBLISHED, currentlySelectedTextObject);
|
||||
}
|
||||
}
|
||||
|
||||
public function needToPublish() : Boolean {
|
||||
return currentlySelectedTextObject != null && currentlySelectedTextObject.status != TextObject.TEXT_PUBLISHED;
|
||||
}
|
||||
|
||||
public function drawGraphic(event:WhiteboardUpdate):void{
|
||||
var o:Annotation = event.annotation;
|
||||
// LogUtil.debug("**** Drawing graphic [" + o.type + "] *****");
|
||||
|
@ -21,7 +21,7 @@ package org.bigbluebutton.modules.whiteboard.models
|
||||
import flash.events.IEventDispatcher;
|
||||
|
||||
import mx.collections.ArrayCollection;
|
||||
import org.bigbluebutton.core.UsersUtil;
|
||||
|
||||
import org.as3commons.logging.api.ILogger;
|
||||
import org.as3commons.logging.api.getClassLogger;
|
||||
import org.bigbluebutton.modules.present.model.Page;
|
||||
|
@ -109,7 +109,7 @@ package org.bigbluebutton.modules.whiteboard.views {
|
||||
var tbWidth:Number = Math.abs(_mouseXMove - _mouseXDown);
|
||||
var tbHeight:Number = Math.abs(_mouseYMove - _mouseYDown);
|
||||
|
||||
if (tbHeight == 0 && tbWidth == 0) {
|
||||
if (tbHeight == 0 && tbWidth == 0 && !_wbCanvas.finishedTextEdit) {
|
||||
tbWidth = _singleClickWidth;
|
||||
tbHeight = _singleClickHeight;
|
||||
if (_mouseXDown + _singleClickWidth > _wbCanvas.width || _mouseYDown + _singleClickHeight > _wbCanvas.height) {
|
||||
|
@ -43,12 +43,14 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
public var model:WhiteboardCanvasModel;
|
||||
public var displayModel:WhiteboardCanvasDisplayModel;
|
||||
public var finishedTextEdit : Boolean;
|
||||
|
||||
public var textToolbar:WhiteboardTextToolbar;
|
||||
private var bbbCanvas:IBbbCanvas;
|
||||
private var _xPosition:int;
|
||||
private var _yPosition:int;
|
||||
private var images:Images = new Images();
|
||||
|
||||
[Bindable] private var select_icon:Class = images.select_icon;
|
||||
[Bindable] private var pencil_icon:Class = images.pencil_icon;
|
||||
[Bindable] private var rectangle_icon:Class = images.square_icon;
|
||||
@ -100,6 +102,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
|
||||
private function doMouseDown(event:Event):void {
|
||||
finishedTextEdit = displayModel.needToPublish();
|
||||
displayModel.doMouseDown(this.mouseX, this.mouseY);
|
||||
model.doMouseDown(this.mouseX, this.mouseY);
|
||||
event.stopPropagation(); // we want to stop the bubbling so slide doesn't move
|
||||
|
Loading…
Reference in New Issue
Block a user