From 95ff9d0925829359321f8360a11fe11c10291b48 Mon Sep 17 00:00:00 2001 From: Richard Alam Date: Wed, 8 Jul 2015 20:57:16 +0000 Subject: [PATCH] - specify location of poll result display --- .../org/bigbluebutton/core/apps/PollApp.scala | 1 + .../business/shapes/PollResultObject.as | 26 ++++--------------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/PollApp.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/PollApp.scala index f1fbbe96bf..6843582af7 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/PollApp.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/PollApp.scala @@ -78,6 +78,7 @@ trait PollApp { val gson = new Gson() shape += "result" -> gson.toJson(answers.toArray) + // Hardcode poll result display location for now. val display = new ArrayList[Double]() display.add(21.845575) display.add(23.145401) diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/business/shapes/PollResultObject.as b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/business/shapes/PollResultObject.as index 85d363596c..f008dc9104 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/business/shapes/PollResultObject.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/whiteboard/business/shapes/PollResultObject.as @@ -236,7 +236,6 @@ package org.bigbluebutton.modules.whiteboard.business.shapes } private function drawRect(a:Annotation, parentWidth:Number, parentHeight:Number, zoom:Number):void { - // LogUtil.debug("Drawing RECTANGLE"); var ao:Object = a.annotation; this.graphics.lineStyle(1 * zoom, 0); @@ -251,27 +250,14 @@ package org.bigbluebutton.modules.whiteboard.business.shapes } override public function draw(a:Annotation, parentWidth:Number, parentHeight:Number, zoom:Number):void { - // if (_pollGraphic != null) { - // this.removeChild(_pollGraphic); - // } - - // _pollGraphic = new PollGraphic(); - // this.addChild(_pollGraphic); - var ao:Object = a.annotation; trace("RESULT = " + JSON.stringify(a)); -// drawRect(a, parentWidth, parentHeight, zoom); -/* - _pollGraphic.x = denormalize((ao.points as Array)[0], parentWidth); - _pollGraphic.y = denormalize((ao.points as Array)[1], parentHeight); - _pollGraphic.width = denormalize((ao.points as Array)[2], parentWidth); - _pollGraphic.height = denormalize((ao.points as Array)[3], parentHeight); -*/ + var arrayEnd:Number = (ao.points as Array).length; - var startX:Number = denormalize(21.845575, parentWidth); - var startY:Number = denormalize(23.145401, parentHeight); - var pwidth:Number = denormalize(46.516006, parentWidth) - startX; - var pheight:Number = denormalize(61.42433, parentHeight) - startY; + var startX:Number = denormalize((ao.points as Array)[0], parentWidth); + var startY:Number = denormalize((ao.points as Array)[1], parentHeight); + var pwidth:Number = denormalize((ao.points as Array)[2], parentWidth) - startX; + var pheight:Number = denormalize((ao.points as Array)[3], parentHeight) - startY; var answers:Array = ao.result as Array; var ans:Array = new Array(); @@ -287,8 +273,6 @@ package org.bigbluebutton.modules.whiteboard.business.shapes updateDisplayList(pwidth, pheight); -// drawRect(a, parentWidth, parentHeight, zoom); - } override public function redraw(a:Annotation, parentWidth:Number, parentHeight:Number, zoom:Number):void {