fix: 修复多个已知问题

This commit is contained in:
bighuixiang
2025-06-29 23:29:47 +08:00
parent 6fc2a8fc57
commit 4a95f27966
41 changed files with 2266 additions and 351 deletions

View File

@@ -17,6 +17,7 @@ export const createRasterizedImage = async ({
format = "png", // 图像格式
scaleFactor = 2, // 高清倍数 - 默认是画布的高清倍数
isReturenDataURL = false, // 是否返回DataURL而不是fabric.Image对象
isThumbnail = false, // 是否为缩略图
} = {}) => {
try {
console.log(`📊 开始栅格化 ${fabricObjects.length} 个对象`);
@@ -34,6 +35,8 @@ export const createRasterizedImage = async ({
currentZoom
);
if (isThumbnail) scaleFactor = 0.2; // 缩略图使用较小的高清倍数
console.log(`高清倍数: ${scaleFactor}, 当前缩放: ${currentZoom}`);
// 使用组对象方式创建栅格化图像