From 302040b86daa1e5182e7649dbb2fdba8c9d5d1a8 Mon Sep 17 00:00:00 2001 From: Chad Pilkey Date: Thu, 25 May 2017 23:46:52 -0400 Subject: [PATCH] fix whiteboard shapes to again send proper statuses --- .../modules/whiteboard/views/ShapeDrawListener.as | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/ShapeDrawListener.as b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/ShapeDrawListener.as index 50463b1072..aa6a6fd1f0 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/ShapeDrawListener.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/views/ShapeDrawListener.as @@ -84,10 +84,12 @@ package org.bigbluebutton.modules.whiteboard.views //normalize points as we get them to avoid shape drift var np:Point = _shapeFactory.normalizePoint(mouseX, mouseY); + var statusToSend:String = (_segment.length == 2 ? AnnotationStatus.DRAW_START : AnnotationStatus.DRAW_UPDATE); + _segment[2] = np.x; _segment[3] = np.y; - sendShapeToServer(AnnotationStatus.DRAW_UPDATE, tool); + sendShapeToServer(statusToSend, tool); } } } @@ -102,14 +104,20 @@ package org.bigbluebutton.modules.whiteboard.views */ _isDrawing = false; + //normalize points as we get them to avoid shape drift + var np:Point = _shapeFactory.normalizePoint(mouseX, mouseY); + + _segment[2] = np.x; + _segment[3] = np.y; + sendShapeToServer(AnnotationStatus.DRAW_END, tool); } /* (_isDrawing) */ } } private function sendShapeToServer(status:String, tool:WhiteboardTool):void { - if (_segment.length == 0) { -// LogUtil.debug("SEGMENT LENGTH = 0"); + if (_segment.length > 2) { + // LogUtil.debug("SEGMENT too short"); return; }