PptxGenJS icon indicating copy to clipboard operation
PptxGenJS copied to clipboard

BUG - Adding border option TOP border doesn't display for specified row

Open whoami999 opened this issue 1 year ago • 2 comments

We appreciate your feedback - to help the team understand your needs please complete the following template to ensure we have the details to help.

Submission Guidelines

  • If you are not using the latest release, please update and see if the issue is resolved before submitting an issue Believe I am at least stable and not the beta.
  • General questions or high-level topics should be posted in Discussions. I looked for resolutions and doing one row up and applying the bottom border isn't acceptable.
  • Please browse the online Documentation to see if your question is already addressed there. Tried browsing many locations.

Issue Category

  • [ ] Enhancement
  • [X] Bug
  • [ ] Question
  • [ ] Documentation gap/issue

Product Versions

  • Please specify what version of the library you are using: 3.12.0
  • Please specify what version(s) of PowerPoint you are targeting: Office 365
  • Please specify what web browser you are using: Chrome

Desired Behavior

let rows = [ [ { text:'Top Lft', options:{ valign:'t', align:'l', font_face:'Arial' } }, { text:'Top Ctr', options:{ valign:'t', align:'c', font_face:'Verdana' } }, { text:'Top Rgt', options:{ valign:'t', align:'r', font_face:'Courier' } } ], [ { text:'Middle Lft', options:{ valign:'t', align:'l', font_face:'Arial',
border: {type: 'solid', pt: 1.5, color: '#A98989'} } }, { text:'Middle Ctr', options:{ valign:'t', align:'c', font_face:'Verdana' } }, { text:'Middle Rgt', options:{ valign:'t', align:'r', font_face:'Courier' } } ] ]; let tabOpts = { x:0.5, y:3.5, w:9.0, rowH:0.6, fill:'F7F7F7', font_size:18, color:'6f9fc9', valign:'m'} slide.addTable( rows, tabOpts );

I would expect the 'Middle Lft' cell to have all borders as defined, solid, 1.5pt, and color #A98989

The intent of wanting to put a more defining border around an entire row. Also, table has a bunch of rows above and then have a aggregation of it and want a solid line Top border for the aggregation total row.

Observed Behavior

With having a non-top row cell defined with a border of type solid, pt 1.5, and color: A98989

All I get is a cell with Left, Right, and Bottom borders as defined.

Steps to Reproduce

If you go to: https://jsfiddle.net/gitbrent/L1uctxm0/ Paste in the below for the script file Javascript-pureJS

let pptx = new PptxGenJS(); $('small').before('(pptxgenjs version: ' + pptx.version + ')');

// Simple Slide window.doDemo = function do7cells() { let pptx = new PptxGenJS(); let slide = pptx.addSlide(); let opts = { x: 0.0, y: 0.25, w: '100%', h: 1.5, align: 'center', fontSize: 24, color: '0088CC', fill: 'F1F1F1' }; slide.addText( 'BONJOUR - CIAO - GUTEN TAG - HELLO - HOLA - NAMASTE - OLÀ - ZDRAS-TVUY-TE - こんにちは - 你好', opts );

let rows = [ [ { text:'Top Lft', options:{ align:'left', font_face:'Arial' } }, { text:'Top Ctr', options:{ align:'center', font_face:'Verdana' } }, { text:'Top Rgt', options:{ align:'right', font_face:'Courier' } } ], [ { text:'Middle Lft', options:{ valign:'top', align:'left', font_face:'Arial',
border: {type: 'solid', pt: 1.5, color: '#A98989'} } }, { text:'Middle Ctr', options:{ valign:'middle', align:'center', font_face:'Verdana' } }, { text:'Middle Rgt', options:{ valign:'bottom', align:'right', font_face:'Courier' } } ] ]; let tabOpts = { x:0.5, y:3.5, w:9.0, rowH:0.6, fill:'F7F7F7', font_size:18, color:'6f9fc9', valign:'m'} slide.addTable( rows, tabOpts );

pptx.writeFile(); }

whoami999 avatar Feb 07 '24 15:02 whoami999