= MINIMUM_ROW_HEIGHT) {
return true;
}
return false;
}
private function squishDGRows(): void
{
board.verticalScrollPolicy = "off";
var userConfiguredFontSize:int = model.boardSpec.displayBoardProperties.fontSize;
var squishedFontSize: Number = (getSquishedGridRowHt() / getGridRowHeight()) * userConfiguredFontSize;
var changeEvent: NumberEvent = new NumberEvent(NumberEvent.EVENT_CHANGE_SQUISH_FONT_SIZE);
if (squishedFontSize >= MINIMUM_FONT_SIZE && squishedFontSize <= userConfiguredFontSize) {
changeEvent.value = squishedFontSize;
board.setStyle("fontSize", squishedFontSize);
board.rowHeight = getSquishedGridRowHt();
} else if (squishedFontSize > userConfiguredFontSize) {
changeEvent.value = userConfiguredFontSize;
board.setStyle("fontSize", userConfiguredFontSize);
board.rowHeight = getGridRowHeight();
} else {
changeEvent.value = MINIMUM_FONT_SIZE;
board.setStyle("fontSize", MINIMUM_FONT_SIZE);
board.rowHeight = MINIMUM_ROW_HEIGHT
}
changeEvent.dispatch();
}
private function getSquishedGridRowHt(): Number
{
//40 pixels for making sure we see all the screen...Sometimes there is plastic that cover the actual screen in laptops etc..
//saw this on one of testing laptops where some portion of last row was hidden under plastic covering..
var boardHeight:Number = (board.height - board.headerHeight - 40);
var rowHeight:Number = boardHeight / (model.boardData.length + 1);
return rowHeight
}
//There is now way to calculate row height since everything is dynamic
//we can only go of something that we do know and it's user configured Font size.
private function getGridRowHeight(): int {
var rowHt:int = Math.floor(model.boardSpec.displayBoardProperties.fontSize * 2);
return rowHt;
}
private function startScrolling(): void {
//Reset the board properties back to original settings
resetOriginalBoardProperties();
//recalcuate the loops here in case the dataprovider has changed..
var actualRowCountNum:Number = (board.height - board.headerHeight) / getGridRowHeight(); //account for header
var actualRowCount:int = Math.floor(actualRowCountNum);
var loopsNum:Number = (model.boardData.length + 1) / (actualRowCount);
var numOfLoops:int = Math.ceil(loopsNum);
if (counter >= numOfLoops) counter = 0;
board.verticalScrollPosition = (counter * actualRowCount);
counter++;
}
private function resetOriginalBoardProperties(): void {
board.verticalScrollPolicy = "auto";
board.setStyle("fontSize", model.boardSpec.displayBoardProperties.fontSize);
board.rowHeight = getGridRowHeight();
var changeEvent: NumberEvent = new NumberEvent(NumberEvent.EVENT_CHANGE_SQUISH_FONT_SIZE);
changeEvent.value = model.boardSpec.displayBoardProperties.fontSize;
changeEvent.dispatch();
}
]]>
This board is disconnected from the server. Last updated
{dateFormatter.format(model.boardLastUpdated)}. {model.connecting ? "Trying to reconnect..." : "Will try to reconnect in " + model.reconnectSeconds + " seconds."}