From 64c86bcd63dfdef5aa2a9292257621ce207648ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=BF=9B?= Date: Mon, 27 Jul 2026 18:14:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20schemaToPptxBlob=20=E4=BC=A0=E9=80=92=20?= =?UTF-8?q?rotate=20=E7=BB=99=20pptxgenjs=20+=20=E6=B8=85=E7=90=86=20debug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web-to-ppt/convert-browser.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/web-to-ppt/convert-browser.js b/web-to-ppt/convert-browser.js index fae46d4..479536a 100644 --- a/web-to-ppt/convert-browser.js +++ b/web-to-ppt/convert-browser.js @@ -1,5 +1,3 @@ -// VERSION: 2026-07-27-18:10 -console.log("[WebToPPT] convert-browser.js loaded: 2026-07-27-18:10"); /** * convert-browser.js — 浏览器兼容版转化逻辑 * @@ -444,10 +442,6 @@ async function convertToPptx(input, onProgress) { } } - // Debug: log card nodes - if ((n.name||'').includes('card') || (n.name||'').includes('rotate')) { - console.log('[WebToPPT] NODE:', (n.name||'').slice(0,25), 'type=', n.type, 'fillColor=', fillColor, 'bg=', (n.styles?.backgroundColor||'none').slice(0,20)); - } if (fillColor) { var shapeOpts = { x: opts.x, y: opts.y, w: opts.w, h: opts.h, fill: { color: fillColor } }; if (fillTransparency) shapeOpts.fill.transparency = fillTransparency; @@ -472,7 +466,6 @@ async function convertToPptx(input, onProgress) { // 旋转 if (n.styles.transform && n.styles.transform !== 'none') { - console.log('[WebToPPT] ROTATE CHECK:', (n.name||'').slice(0,20), 'transform=', n.styles.transform.slice(0,40)); var rotateMatch = n.styles.transform.match(/rotate\(([-\d.]+)deg\)/); if (rotateMatch) { shapeOpts.rotate = parseFloat(rotateMatch[1]); @@ -601,6 +594,7 @@ async function schemaToPptxBlob(schema) { else shapeOpts.line = { type: 'none' }; if (o.shadow) shapeOpts.shadow = o.shadow; if (o.rectRadius) shapeOpts.rectRadius = o.rectRadius; + if (o.rotate) shapeOpts.rotate = o.rotate; slide.addShape(pres.ShapeType[st] || pres.ShapeType.rect, shapeOpts); } else if (obj.type === 'image') { slide.addImage({ x: o.x, y: o.y, w: o.w, h: o.h, data: o.data || o.path });