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

colW can't function #15

Closed
ninas880025 opened this issue Dec 16, 2016 · 2 comments
Closed

colW can't function #15

ninas880025 opened this issue Dec 16, 2016 · 2 comments
Assignees

Comments

@ninas880025
Copy link

I used the colW property according to document to set each width of column but it failed to work.
There are 7 columns in my table and I set colW like this:

var tabOpts = {x:0.5, y:0.73, cx:9.0, rowH:0.25, colW:[0.65, 3.25, 0.65, 0.65, 0.65, 1.3, 0.65]};

@gitbrent gitbrent self-assigned this Dec 16, 2016
gitbrent pushed a commit that referenced this issue Dec 16, 2016
Fix for #15 and other fixes, changes, etc.
@gitbrent
Copy link
Owner

Thanks for reporting this! It's fixed as of now.

The addTable() method was merely checking the second option object for colW, which really made me question the design of the method itself. It was not well though out and would easily lend itself to issues like this.

Therefore, I've updated the API (and the docs) to use a single {OPTIONS} object that consolidates all the table options like all the other Slide methods.

Example:

var tabOpts = { x:1, y:1, colW:[0.65, 3.25, 0.65, 0.65, 0.65, 1.3, 0.65] };
slide.addTable( [1,2,3,4,5,6,7], tabOpts );

@ninas880025
Copy link
Author

ninas880025 commented Dec 19, 2016 via email

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