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

autopage and colspan #80

Closed
Szymon-dziewonski opened this issue May 9, 2017 · 1 comment
Closed

autopage and colspan #80

Szymon-dziewonski opened this issue May 9, 2017 · 1 comment
Assignees
Milestone

Comments

@Szymon-dziewonski
Copy link

Hello, I think this is a bug when in options table is autoPage: false then colspan doesn't work

example from demo plus autoPage option

    var tabOpts1 = {
      autoPage: false,
      x: 0.5,
      y: 1.1,
      w: '90%',
      h: 2,
      fill: 'F5F5F5',
      color: '3D3D3D',
      font_size: 16,
      border: {pt: 4, color: 'FFFFFF'},
      align: 'c',
      valign: 'm'
    };
    var arrTabRows1 = [
      [{text: 'C1 -> D1', options: {colspan: 2, fill: '99FFCC'}}],
      ['D2', 'E2'],
      ['D3', 'E3']
    ];
    console.log(arrTabRows1)
    // NOTE: Follow HTML conventions for colspan/rowspan cells - cells spanned are left out of arrays - see above
    // The table above has 6 columns, but each of the 3 rows has 4-5 elements as colspan/rowspan replacing the missing ones
    // (e.g.: there are 5 elements in the first row, and 6 in the second)
    slide.addTable(arrTabRows1, tabOpts1);

Result
image

Plugin cuts second row
Hope this helps

@gitbrent gitbrent self-assigned this May 10, 2017
gitbrent pushed a commit that referenced this issue May 18, 2017
@gitbrent gitbrent added this to the v1.5.0 milestone May 18, 2017
@gitbrent
Copy link
Owner

Hi @Szymon-dziewonski ,

Thanks for reporting this!

The logic used to determine total number of cols to iterate over was different in the paging function versus the non-paging functions, hence the disparity.

screen shot 2017-05-17 at 21 43 15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants