In whiteboard text tool, a single click while editing a text sends it without creating a new text zone.
This commit is contained in:
parent
3a620234b6
commit
97179a1cbe
@ -70,10 +70,14 @@ 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;
|
||||
|
@ -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,12 +102,13 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
|
||||
private function doMouseDown(event:Event):void {
|
||||
displayModel.doMouseDown(this.mouseX, this.mouseY);
|
||||
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
|
||||
|
||||
stage.addEventListener(MouseEvent.MOUSE_UP, doMouseUp);
|
||||
stage.addEventListener(MouseEvent.MOUSE_MOVE, doMouseMove);
|
||||
stage.addEventListener(MouseEvent.MOUSE_MOVE, doMouseMove);
|
||||
}
|
||||
|
||||
private function doMouseMove(event:Event):void {
|
||||
|
Loading…
Reference in New Issue
Block a user