Merge pull request #684 from capilkey/poll-client
Added a new whiteboard shape for the poll results
This commit is contained in:
commit
17ead75786
@ -43,6 +43,7 @@ package org.bigbluebutton.modules.whiteboard.business.shapes
|
||||
public static const TEXT:String = "text";
|
||||
public static const TRIANGLE:String = "triangle";
|
||||
public static const LINE:String = "line";
|
||||
public static const POLL:String = "poll_result";
|
||||
|
||||
/**
|
||||
* Status = [START, UPDATE, END]
|
||||
|
@ -0,0 +1,32 @@
|
||||
package org.bigbluebutton.modules.whiteboard.business.shapes
|
||||
{
|
||||
import org.bigbluebutton.modules.polling.views.PollGraphic;
|
||||
import org.bigbluebutton.modules.whiteboard.models.Annotation;
|
||||
|
||||
public class PollResult extends DrawObject
|
||||
{
|
||||
var _pollGraphic:PollGraphic;
|
||||
|
||||
public function PollResult(id:String, type:String, status:String) {
|
||||
super(id, type, status);
|
||||
|
||||
_pollGraphic = new PollGraphic();
|
||||
this.addChild(_pollGraphic);
|
||||
}
|
||||
|
||||
override public function draw(a:Annotation, parentWidth:Number, parentHeight:Number, zoom:Number):void {
|
||||
var ao:Object = a.annotation;
|
||||
|
||||
_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;
|
||||
}
|
||||
|
||||
override public function redraw(a:Annotation, parentWidth:Number, parentHeight:Number, zoom:Number):void {
|
||||
draw(a, parentWidth, parentHeight, zoom);
|
||||
}
|
||||
}
|
||||
}
|
@ -64,6 +64,8 @@ package org.bigbluebutton.modules.whiteboard.business.shapes
|
||||
return new Line(a.id, a.type, a.status);
|
||||
} else if (a.type == DrawObject.TRIANGLE) {
|
||||
return new Triangle(a.id, a.type, a.status);
|
||||
} else if (a.type == DrawObject.POLL) {
|
||||
return new PollResult(a.id, a.type, a.status);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user