feat: 四圆角独立处理 + transform rotate
- 圆角:取四角最大值(PPT只支持统一圆角) - 旋转:CSS transform:rotate → pptxgenjs rotate - 两个文件同步
This commit is contained in:
@@ -476,8 +476,7 @@ async function convertToPptx(input, onProgress) {
|
||||
// 形状类型
|
||||
var useShape = 'rect';
|
||||
if (shapeOpts.rectRadius) {
|
||||
var brPct = parseFloat(n.styles.borderTopLeftRadius);
|
||||
var isCircle = (brPct >= 50 || (brPct.toString().includes('%') && parseFloat(brPct) >= 50)) && Math.abs(opts.w - opts.h) < 0.05;
|
||||
var isCircle = shapeOpts.rectRadius >= 0.5 && Math.abs(opts.w - opts.h) < 0.05;
|
||||
useShape = isCircle ? 'ellipse' : 'roundRect';
|
||||
}
|
||||
objects.push({ type: 'shape', shapeName: useShape, options: shapeOpts });
|
||||
|
||||
Reference in New Issue
Block a user