Skip to content
New issue

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

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

Already on GitHub? # to your account

Multiple Border Types not supported in Table Cell #775

Closed
jsvishal opened this issue Jun 20, 2020 · 2 comments
Closed

Multiple Border Types not supported in Table Cell #775

jsvishal opened this issue Jun 20, 2020 · 2 comments
Assignees
Milestone

Comments

@jsvishal
Copy link

jsvishal commented Jun 20, 2020

Border:  [ {type:"none", color:'FF0000',pt:1}, {type:"dash", color:'FF0000',pt:1}, {type:"none",color:'0000ff',pt:5}, {type:"dash",color:'9e9e9e',pt:1} ];

Multiple border styles not working.

image

@gitbrent gitbrent added this to the 3.3.0 milestone Jun 23, 2020
@gitbrent gitbrent self-assigned this Jun 23, 2020
@gitbrent
Copy link
Owner

Good catch, i did not have a test case for multi-border that used type:none

gitbrent added a commit that referenced this issue Jun 24, 2020
@gitbrent
Copy link
Owner

Fixed in master/v3.3.0

var pptx = new PptxGenJS();
var slide = pptx.addSlide();

slide.addTable(
  [
    [
      {
        text: "cell",
        options: {
          border: [
            { type: "none", color: "FF0000", pt: 1 },
            { type: "dash", color: "FF0000", pt: 1 },
            { type: "none", color: "0000ff", pt: 5 },
            { type: "dash", color: "9e9e9e", pt: 1 },
          ],
        },
      },
    ],
  ],
  { x: 1, y: 1, w: "80%", h: 3, align: "center", fill: pptx.SchemeColor.background2 }
);

pptx.writeFile("PptxGenJS-Sandbox-" + getTimestamp()).then(function (fileName) {
  console.log("Saved! File Name: " + fileName);
});

Screen Shot 2020-06-23 at 23 24 43

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

No branches or pull requests

2 participants