Skip to content

Commit

Permalink
Stopping form view from chopping off (invalid) long rows
Browse files Browse the repository at this point in the history
Fixes guntrip#5
  • Loading branch information
guntrip committed Oct 1, 2015
1 parent 9a72388 commit 911ed16
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion magic.js
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,8 @@ function array2html(array) {

function array2form(array) {

form_cols=0;

var html = "<div class=\"buttonbar\">"+
"<button class=\"btn btn-sm\" type=\"button\" onclick=\"form_add_row();\">Add row</button> "+
"<button class=\"btn btn-sm\" type=\"button\" onclick=\"form_add_col();\">Add column</button>"+
Expand Down Expand Up @@ -592,7 +594,7 @@ function array2form(array) {
html += "</thead><tbody>";
}

form_cols=row.length;
if (row.length>form_cols) { form_cols=row.length; }

}

Expand Down

0 comments on commit 911ed16

Please sign in to comment.