Open quidama opened 1 year ago
border: { pt: '0.25', color: '7F7F7F' },
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 } }) ---**
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
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 } }) ---**