Skip to content
Snippets Groups Projects
Commit a8342830 authored by Richard Alam's avatar Richard Alam
Browse files

- poll result message now compes into the client but doesn't get displayed in the whiteboard

parent 50607260
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,12 @@ package org.bigbluebutton.modules.whiteboard.business.shapes
public class PollResult extends DrawObject
{
var _pollGraphic:PollGraphic;
private var _pollGraphic:PollGraphic;
private var sampledata:Array = [{a:"A", v:3},
{a:"B", v:1},
{a:"C", v:5},
{a:"D", v:8}];
public function PollResult(id:String, type:String, status:String) {
super(id, type, status);
......@@ -16,13 +21,34 @@ package org.bigbluebutton.modules.whiteboard.business.shapes
override public function draw(a:Annotation, parentWidth:Number, parentHeight:Number, zoom:Number):void {
var ao:Object = a.annotation;
trace("RESULT = " + JSON.stringify(a));
_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);
_pollGraphic.data = ao.results;
_pollGraphic.x = 0;
_pollGraphic.y = 0;
_pollGraphic.width = 20;
_pollGraphic.height = 20;
this.x = 0;
this.y = 0;
this.width = 20;
this.height = 20;
var answers:Array = ao.result as Array;
var ans:Array = new Array();
for (var j:int = 0; j < answers.length; j++) {
var ar:Object = answers[j];
var rs:Object = {a: ar.key, v: ar.num_votes as Number};
trace("poll result a=[" + ar.key + "] v=[" + ar.num_votes +"]");
ans.push(rs);
}
_pollGraphic.data = sampledata;
}
override public function redraw(a:Annotation, parentWidth:Number, parentHeight:Number, zoom:Number):void {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment