From f84d479f9be06de1c03200590b6ca6b482e06d83 Mon Sep 17 00:00:00 2001 From: Chad Pilkey Date: Wed, 19 Aug 2015 13:13:13 -0400 Subject: [PATCH] fixed the poll display so that vote count is always visible --- .../modules/polling/views/PollGraphic.as | 13 +++++++++---- .../whiteboard/business/shapes/PollResultObject.as | 12 +++++++++--- 2 files changed, 18 insertions(+), 7 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 4dd3421d94..7ac2352e85 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/PollGraphic.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/PollGraphic.as @@ -122,7 +122,7 @@ package org.bigbluebutton.modules.polling.views var startingLabelWidth:Number = Math.min(labelWidthPercent*unscaledWidth, labelMaxWidthInPixels); - graphics.lineStyle(2); + graphics.lineStyle(2, colFill); graphics.beginFill(colFill, 1.0); for (var j:int=0, vp:int=extraVPixels, ry:int=0, curRowHeight:int=0; j<_data.length; j++) { ry += Math.round(curRowHeight/2)+vpadding; // add the last row's height plus padding @@ -219,16 +219,21 @@ package org.bigbluebutton.modules.polling.views // add vote count in middle of rect countText = _textFields[currTFIdx++]; // new TextField(); countText.text = _data[j].v; - countText.width = rectWidth; + countText.width = startingLabelWidth; countText.height = curRowHeight; - countText.textColor = bgFill; countText.selectable = false; //addChild(countText); findFontSize(countText, minFontSize); countText.width = countText.textWidth+4; countText.height = countText.textHeight+4; - countText.x = barStartX+rectWidth/2-countText.width/2; countText.y = ry-countText.height/2; + if (countText.width > rectWidth) { + countText.x = barStartX + rectWidth + hpadding/2; + countText.textColor = colFill; + } else { + countText.x = barStartX + rectWidth/2 - countText.width/2; + countText.textColor = bgFill; + } } graphics.endFill(); 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 adf41d8464..3b39e2f8c2 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 @@ -84,7 +84,7 @@ package org.bigbluebutton.modules.whiteboard.business.shapes graphics.clear(); if (_data != null && _data.length > 0) { - graphics.lineStyle(2, marginFill); + graphics.lineStyle(0, marginFill); graphics.beginFill(marginFill, 1.0); graphics.drawRect(0, 0, unscaledWidth, unscaledHeight); graphics.endFill(); @@ -227,7 +227,7 @@ package org.bigbluebutton.modules.whiteboard.business.shapes // add vote count in middle of rect countText = _textFields[currTFIdx++]; // new TextField(); countText.text = _data[j].v; - countText.width = rectWidth; + countText.width = startingLabelWidth; countText.height = curRowHeight; countText.textColor = bgFill; countText.selectable = false; @@ -235,8 +235,14 @@ package org.bigbluebutton.modules.whiteboard.business.shapes findFontSize(countText, minFontSize); countText.width = countText.textWidth+4; countText.height = countText.textHeight+4; - countText.x = graphX + barStartX + rectWidth/2 - countText.width/2; countText.y = ry-countText.height/2; + if (countText.width > rectWidth) { + countText.x = barStartX + rectWidth + hpadding/2; + countText.textColor = colFill; + } else { + countText.x = barStartX + rectWidth/2 - countText.width/2; + countText.textColor = bgFill; + } } graphics.endFill();