Fix bug in contract summary display, adjust tab stops
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5377 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
667bc9e683
commit
a4b9803430
@ -281,7 +281,7 @@ this._parcelContractsDisplay = function(summary) {
|
||||
this._parcelContractSummaryPage = function()
|
||||
{
|
||||
// column 'tab stops'
|
||||
var columns = [13,21,28];
|
||||
var columns = [14,21,28];
|
||||
|
||||
// column header line
|
||||
var headline = expandMissionText("oolite-contracts-parcels-column-cargo");
|
||||
@ -594,6 +594,10 @@ this._paddingText = function(currentText, desiredLength)
|
||||
var hairSpaceLength = defaultFont.measureString(hairSpace);
|
||||
// calculate number needed to fill remaining length
|
||||
var padsNeeded = Math.floor((desiredLength - currentLength) / hairSpaceLength);
|
||||
if (padsNeeded < 1)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
// quick way of generating a repeated string of that number
|
||||
return new Array(padsNeeded).join(hairSpace);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user