gitbrent / PptxGenJS

Create PowerPoint presentations with a powerful, concise JavaScript API.
https://gitbrent.github.io/PptxGenJS/
MIT License
2.84k stars 625 forks source link

[Table] border width between 0 to 1 not working #1235

Open quidama opened 1 year ago

quidama commented 1 year ago

border: { pt: '0.25', color: '7F7F7F' },

value of pt always rounded. I think that from 'Math.round' in gen-tables.ts

sidesBor.forEach((val, idxb) => { const intBorderW = Math.round( Number( window .getComputedStyle(cell) .getPropertyValue('border-' + val + '-width') .replace('px', '') ) ) let arrRGB = [] arrRGB = window .getComputedStyle(cell) .getPropertyValue('border-' + val + '-color') .replace(/\s+/gi, '') .replace('rgba(', '') .replace('rgb(', '') .replace(')', '') .split(',') const strBorderC = rgbToHex(Number(arrRGB[0]), Number(arrRGB[1]), Number(arrRGB[2])) cellOpts.border[idxb] = { pt: intBorderW, color: strBorderC } }) ---**

ChillyBots commented 8 months ago

I'm getting the same issue here for font sizes. It seems there are a lot of Math.round calls in the codebase that remove values allowed in Powerpoint