画布增加的新功能
This commit is contained in:
@@ -68,7 +68,7 @@ export const createRasterizedImage = async ({
|
||||
isReturenDataURL,
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("创建栅格化图像失败:", error);
|
||||
console.warn("创建栅格化图像失败:", error);
|
||||
throw new Error(`栅格化失败: ${error.message}`);
|
||||
}
|
||||
};
|
||||
@@ -163,7 +163,7 @@ const createClippedObjects = async ({
|
||||
console.log("✅ 返回裁剪后的fabric对象,已恢复到优化后的原始大小和位置");
|
||||
return fabricImage;
|
||||
} catch (error) {
|
||||
console.error("创建裁剪对象失败:", error);
|
||||
console.warn("创建裁剪对象失败:", error);
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
@@ -1239,7 +1239,7 @@ const calculateOptimizedBounds = (clippingObject, fabricObjects) => {
|
||||
|
||||
return optimizedBounds;
|
||||
} catch (error) {
|
||||
console.error("计算优化边界框失败:", error);
|
||||
console.warn("计算优化边界框失败:", error);
|
||||
// 返回原始计算方式作为备选
|
||||
return clippingObject.getBoundingRect(true, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user