You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2019/03/24 18:48:11 UTC
[royale-asjs] branch develop updated: jewel-datechooser: add an
extra empty row in months view to improve layout
This is an automated email from the ASF dual-hosted git repository.
carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new d2eda53 jewel-datechooser: add an extra empty row in months view to improve layout
d2eda53 is described below
commit d2eda5310b58c8f4f416765e10a52656687aea67
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Sun Mar 24 19:48:04 2019 +0100
jewel-datechooser: add an extra empty row in months view to improve layout
---
.../org/apache/royale/jewel/beads/views/DateChooserView.as | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/DateChooserView.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/DateChooserView.as
index 5dc2b74..84969f2 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/DateChooserView.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/DateChooserView.as
@@ -340,12 +340,17 @@ package org.apache.royale.jewel.beads.views
} else {
var currrentYear:Array = [];
var monthIndex:int = 0;
- for(i = 0; i < model.months.length/NUM_COLS_YEARS_OR_MONTHS; i++)
+ var extraEmptyRows:int = 1;
+ for(i = 0; i < model.months.length/NUM_COLS_YEARS_OR_MONTHS + extraEmptyRows; i++)
{
currrentYear[i] = {};
for(j = 0; j < columns.length; j++)
{
- currrentYear[i]["d"+j] = model.months[monthIndex];
+ if(j < model.months.length)
+ currrentYear[i]["d"+j] = model.months[monthIndex];
+ else
+ currrentYear[i]["d"+j] = "";// create extra row with empty values to make rows less separated
+
monthIndex++;
}
}