Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small fix to examples #2564

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions dev-playground/public/samples/tables
Original file line number Diff line number Diff line change
Expand Up @@ -247,19 +247,19 @@ content: [
vLineWidth: function (i, node) {
return (i === 0 || i === node.table.widths.length) ? 2 : 1;
},
hLineColor: function (i, node) {
return (i === 0 || i === node.table.body.length) ? 'black' : 'gray';
hLineColor: function (rowIndex, node, columnIndex) {
return (rowIndex === 0 || rowIndex === node.table.body.length) ? 'black' : 'gray';
},
vLineColor: function (i, node) {
return (i === 0 || i === node.table.widths.length) ? 'black' : 'gray';
vLineColor: function (rowIndex, node, columnIndex) {
return (rowIndex === 0 || rowIndex === node.table.widths.length) ? 'black' : 'gray';
},
// hLineStyle: function (i, node) { return {dash: { length: 10, space: 4 }}; },
// vLineStyle: function (i, node) { return {dash: { length: 10, space: 4 }}; },
// paddingLeft: function(i, node) { return 4; },
// paddingRight: function(i, node) { return 4; },
// paddingTop: function(i, node) { return 2; },
// paddingBottom: function(i, node) { return 2; },
// fillColor: function (i, node) { return null; }
// fillColor: function (rowIndex, node, columnIndex) { return null; }
}
},
{text: 'zebra style', margin: [0, 20, 0, 8]},
Expand Down Expand Up @@ -295,7 +295,7 @@ content: [
['Sample value 1', 'Sample value 2', 'Sample value 3']
]
},
},
},
{text: '... using a custom styler and overriding it in the second row', margin: [0, 20, 0, 8]},
{
style: 'tableOpacityExample',
Expand Down Expand Up @@ -354,10 +354,10 @@ content: [
vLineWidth: function (i, node) {
return (i === 0 || i === node.table.widths.length) ? 2 : 1;
},
hLineColor: function (i, node) {
hLineColor: function (rowIndex, node, columnIndex) {
return 'black';
},
vLineColor: function (i, node) {
vLineColor: function (rowIndex, node, columnIndex) {
return 'black';
},
hLineStyle: function (i, node) {
Expand All @@ -376,7 +376,7 @@ content: [
// paddingRight: function(i, node) { return 4; },
// paddingTop: function(i, node) { return 2; },
// paddingBottom: function(i, node) { return 2; },
// fillColor: function (i, node) { return null; }
// fillColor: function (rowIndex, node, columnIndex) { return null; }
}
},
{text: 'Optional border', fontSize: 14, bold: true, pageBreak: 'before', margin: [0, 0, 0, 8]},
Expand Down
14 changes: 7 additions & 7 deletions examples/tables.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,11 @@ var docDefinition = {
vLineWidth: function (i, node) {
return (i === 0 || i === node.table.widths.length) ? 2 : 1;
},
hLineColor: function (i, node) {
return (i === 0 || i === node.table.body.length) ? 'black' : 'gray';
hLineColor: function (rowIndex, node, columnIndex) {
return (rowIndex === 0 || rowIndex === node.table.body.length) ? 'black' : 'gray';
},
vLineColor: function (i, node) {
return (i === 0 || i === node.table.widths.length) ? 'black' : 'gray';
vLineColor: function (rowIndex, node, columnIndex) {
return (rowIndex === 0 || rowIndex === node.table.widths.length) ? 'black' : 'gray';
},
// hLineStyle: function (i, node) { return {dash: { length: 10, space: 4 }}; },
// vLineStyle: function (i, node) { return {dash: { length: 10, space: 4 }}; },
Expand Down Expand Up @@ -376,10 +376,10 @@ var docDefinition = {
vLineWidth: function (i, node) {
return (i === 0 || i === node.table.widths.length) ? 2 : 1;
},
hLineColor: function (i, node) {
hLineColor: function (rowIndex, node, columnIndex) {
return 'black';
},
vLineColor: function (i, node) {
vLineColor: function (rowIndex, node, columnIndex) {
return 'black';
},
hLineStyle: function (i, node) {
Expand All @@ -398,7 +398,7 @@ var docDefinition = {
// paddingRight: function(i, node) { return 4; },
// paddingTop: function(i, node) { return 2; },
// paddingBottom: function(i, node) { return 2; },
// fillColor: function (i, node) { return null; }
// fillColor: function (rowIndex, node, columnIndex) { return null; }
}
},
{ text: 'Optional border', fontSize: 14, bold: true, pageBreak: 'before', margin: [0, 0, 0, 8] },
Expand Down