Merge remote-tracking branch 'origin/StableVersion' into dev_vite
This commit is contained in:
@@ -18,12 +18,12 @@ export class ExportManager {
|
||||
* @param {Object} options 导出选项
|
||||
* @param {Boolean} options.isContainBg 是否包含背景图层
|
||||
* @param {Boolean} options.isContainFixed 是否包含固定图层
|
||||
* @param {Boolean} options.isCropByBg 是否使用背景大小裁剪
|
||||
* @param {Boolean} options.isCropByBg 是否使用背景大小裁剪
|
||||
* @param {String} options.layerId 导出具体图层ID
|
||||
* @param {Array} options.layerIdArray 导出多个图层ID数组
|
||||
* @param {String} options.expPicType 导出图片类型 (png/jpg/svg)
|
||||
* @param {Boolean} options.restoreOpacityInRedGreen 红绿图模式下是否恢复透明度为1
|
||||
* @param {Boolean} options.isEnhanceImg 是否是增强图片
|
||||
* @param {Boolean} options.isEnhanceImg 是否是增强图片
|
||||
* @returns {String} 导出的图片数据URL
|
||||
*/
|
||||
exportImage(options = {}) {
|
||||
@@ -48,7 +48,7 @@ export class ExportManager {
|
||||
isRedGreenMode,
|
||||
restoreOpacityInRedGreen,
|
||||
isCropByBg,
|
||||
isEnhanceImg,
|
||||
isEnhanceImg, // 是否是增强图片
|
||||
);
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ export class ExportManager {
|
||||
isRedGreenMode,
|
||||
restoreOpacityInRedGreen,
|
||||
isCropByBg,
|
||||
isEnhanceImg
|
||||
isEnhanceImg, // 是否是增强图片
|
||||
);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ export class ExportManager {
|
||||
isRedGreenMode,
|
||||
restoreOpacityInRedGreen,
|
||||
isCropByBg,
|
||||
isEnhanceImg
|
||||
isEnhanceImg, // 是否是增强图片
|
||||
);
|
||||
} catch (error) {
|
||||
console.error("导出图片失败:", error);
|
||||
@@ -98,7 +98,7 @@ export class ExportManager {
|
||||
expPicType,
|
||||
isRedGreenMode,
|
||||
restoreOpacityInRedGreen,
|
||||
isCropByBg,
|
||||
isCropByBg, // 是否使用背景大小裁剪
|
||||
isEnhanceImg, // 是否是增强图片
|
||||
) {
|
||||
if (!this.layerManager) {
|
||||
@@ -127,7 +127,9 @@ export class ExportManager {
|
||||
return this._exportWithRedGreenMode(
|
||||
objectsToExport,
|
||||
expPicType,
|
||||
restoreOpacityInRedGreen
|
||||
restoreOpacityInRedGreen,
|
||||
isCropByBg, // 是否使用背景大小裁剪
|
||||
isEnhanceImg, // 是否是增强图片
|
||||
);
|
||||
}
|
||||
|
||||
@@ -149,7 +151,7 @@ export class ExportManager {
|
||||
* @param {Boolean} isContainFixed 是否包含固定图层
|
||||
* @param {Boolean} isRedGreenMode 是否为红绿图模式
|
||||
* @param {Boolean} restoreOpacityInRedGreen 红绿图模式下是否恢复透明度为1
|
||||
* @param {Boolean} isCropByBg 是否根据背景裁剪
|
||||
* @param {Boolean} isCropByBg 是否使用背景大小裁剪
|
||||
* @param {Boolean} isEnhanceImg 是否是增强图片
|
||||
* @returns {String} 图片数据URL
|
||||
* @private
|
||||
@@ -161,7 +163,7 @@ export class ExportManager {
|
||||
isContainFixed,
|
||||
isRedGreenMode,
|
||||
restoreOpacityInRedGreen,
|
||||
isCropByBg, // 是否根据背景裁剪
|
||||
isCropByBg, // 是否使用背景大小裁剪
|
||||
isEnhanceImg, // 是否是增强图片
|
||||
) {
|
||||
if (!this.layerManager) {
|
||||
@@ -194,7 +196,7 @@ export class ExportManager {
|
||||
objectsToExport,
|
||||
expPicType,
|
||||
restoreOpacityInRedGreen,
|
||||
isCropByBg, // 是否根据背景裁剪
|
||||
isCropByBg, // 是否使用背景大小裁剪
|
||||
isEnhanceImg, // 是否是增强图片
|
||||
);
|
||||
}
|
||||
@@ -206,7 +208,7 @@ export class ExportManager {
|
||||
* @param {Boolean} isContainFixed 是否包含固定图层
|
||||
* @param {Boolean} isRedGreenMode 是否为红绿图模式
|
||||
* @param {Boolean} restoreOpacityInRedGreen 红绿图模式下是否恢复透明度为1
|
||||
* @param {Boolean} isCropByBg 是否根据背景裁剪
|
||||
* @param {Boolean} isCropByBg 是否使用背景大小裁剪
|
||||
* @param {Boolean} isEnhanceImg 是否是增强图片
|
||||
* @returns {String} 图片数据URL
|
||||
* @private
|
||||
@@ -217,8 +219,8 @@ export class ExportManager {
|
||||
isContainFixed,
|
||||
isRedGreenMode,
|
||||
restoreOpacityInRedGreen,
|
||||
isCropByBg,
|
||||
isEnhanceImg
|
||||
isCropByBg, // 是否使用背景大小裁剪
|
||||
isEnhanceImg, // 是否是增强图片
|
||||
) {
|
||||
// 按图层顺序收集对象(从底到顶)
|
||||
const objectsToExport = this._collectObjectsByLayerOrder(
|
||||
@@ -272,7 +274,7 @@ export class ExportManager {
|
||||
expPicType,
|
||||
restoreOpacityInRedGreen,
|
||||
canvasClipPath,
|
||||
isCropByBg, // 是否根据背景裁剪
|
||||
isCropByBg, // 是否使用背景大小裁剪
|
||||
isEnhanceImg, // 是否是增强图片
|
||||
);
|
||||
}
|
||||
@@ -635,7 +637,7 @@ export class ExportManager {
|
||||
objectsToExport,
|
||||
expPicType,
|
||||
restoreOpacityInRedGreen,
|
||||
maskObject,
|
||||
maskObject, // 裁剪对象
|
||||
isCropByBg, // 是否使用背景大小裁剪
|
||||
isEnhanceImg, // 是否是增强图片
|
||||
) {
|
||||
@@ -656,7 +658,7 @@ export class ExportManager {
|
||||
trimWhitespace: true, // 裁剪空白
|
||||
trimPadding: 0, // 裁剪边距
|
||||
restoreOpacityInRedGreen,
|
||||
isCropByBg, // 是否根据背景裁剪
|
||||
isCropByBg, // 是否使用背景大小裁剪
|
||||
isEnhanceImg, // 是否是增强图片
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user