From f3db6617e58f040a59410833222c0f4acc4a0f9b Mon Sep 17 00:00:00 2001 From: Chad Pilkey Date: Thu, 20 Aug 2015 16:37:46 -0400 Subject: [PATCH] improve poll label display --- .../modules/polling/views/PollGraphic.as | 11 ++++++----- .../whiteboard/business/shapes/PollResultObject.as | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/PollGraphic.as b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/PollGraphic.as index 7ac2352e85..c44c59c155 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/PollGraphic.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/PollGraphic.as @@ -40,7 +40,7 @@ package org.bigbluebutton.modules.polling.views private const vPaddingPercent:Number = 0.25; private const hPaddingPercent:Number = 0.1; private const labelWidthPercent:Number = 0.3; - private const labelMaxWidthInPixels:int = 40; + private const labelMaxWidthInPixels:int = 100; private var sampledata:Array = [{a:"A", v:3}, {a:"B", v:1}, @@ -117,10 +117,11 @@ package org.bigbluebutton.modules.polling.views var percentText:TextField; var answerArray:Array = new Array(); var percentArray:Array = new Array(); - var minFontSize:int = 20; + var minFontSize:int = 30; var currFontSize:int; - var startingLabelWidth:Number = Math.min(labelWidthPercent*unscaledWidth, labelMaxWidthInPixels); + //var startingLabelWidth:Number = Math.min(labelWidthPercent*unscaledWidth, labelMaxWidthInPixels); + var startingLabelWidth:Number = labelWidthPercent*unscaledWidth; graphics.lineStyle(2, colFill); graphics.beginFill(colFill, 1.0); @@ -143,7 +144,7 @@ package org.bigbluebutton.modules.polling.views answerText.selectable = false; //addChild(answerText); answerArray.push(answerText); - currFontSize = findFontSize(answerText, 20); + currFontSize = findFontSize(answerText, minFontSize); if (currFontSize < minFontSize) minFontSize = currFontSize; //rowText.height = rowText.textHeight; answerText.x = hpadding; @@ -158,7 +159,7 @@ package org.bigbluebutton.modules.polling.views percentText.selectable = false; //addChild(percentText); percentArray.push(percentText); - currFontSize = findFontSize(percentText, 20); + currFontSize = findFontSize(percentText, minFontSize); if (currFontSize < minFontSize) minFontSize = currFontSize; //percentText.height = percentText.textHeight; //percentText.x = unscaledWidth-percentStartWidth/2-percentText.width/2; 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 38b721ba7b..bbc5bfc967 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 @@ -123,11 +123,12 @@ package org.bigbluebutton.modules.whiteboard.business.shapes var percentText:TextField; var answerArray:Array = new Array(); var percentArray:Array = new Array(); - var minFontSize:int = 20; + var minFontSize:int = 30; var currFontSize:int; - var startingLabelWidth:Number = Math.min(labelWidthPercent*graphWidth, labelMaxWidthInPixels); - + //var startingLabelWidth:Number = Math.min(labelWidthPercent*graphWidth, labelMaxWidthInPixels); + var startingLabelWidth:Number = labelWidthPercent*graphWidth; + graphics.lineStyle(2, colFill); graphics.beginFill(colFill, 1.0); for (var j:int=0, vp:int=extraVPixels, ry:int=graphY, curRowHeight:int=0; j<_data.length; j++) { @@ -149,7 +150,7 @@ package org.bigbluebutton.modules.whiteboard.business.shapes answerText.selectable = false; //addChild(answerText); answerArray.push(answerText); - currFontSize = findFontSize(answerText, 20); + currFontSize = findFontSize(answerText, minFontSize); if (currFontSize < minFontSize) minFontSize = currFontSize; //rowText.height = rowText.textHeight; answerText.x = graphX + hpadding; @@ -164,7 +165,7 @@ package org.bigbluebutton.modules.whiteboard.business.shapes percentText.selectable = false; //addChild(percentText); percentArray.push(percentText); - currFontSize = findFontSize(percentText, 20); + currFontSize = findFontSize(percentText, minFontSize); if (currFontSize < minFontSize) minFontSize = currFontSize; //percentText.height = percentText.textHeight; //percentText.x = graphWidth-percentStartWidth/2-percentText.width/2;