feat: 更新红绿图设置逻辑,支持根据图像模式调整属性;修复笔刷类型同步问题

This commit is contained in:
bighuixiang
2025-06-23 18:01:33 +08:00
parent 9d851872a3
commit 2446f91376
2 changed files with 18 additions and 4 deletions

View File

@@ -458,10 +458,22 @@ export class BatchInitializeRedGreenModeCommand extends Command {
throw new Error("衣服底图未加载,无法设置红绿图位置");
}
// 使用与衣服底图完全相同的属性
if (this.clothingImageOpts?.imageMode) {
imageModeHandler({
imageMode: this.clothingImageOpts?.imageMode,
newImage: img,
canvasWidth: this.canvas.width,
canvasHeight: this.canvas.height,
});
} else {
// 使用与衣服底图完全相同的属性
img.set({
scaleX: clothingImage.scaleX,
scaleY: clothingImage.scaleY,
});
}
img.set({
scaleX: clothingImage.scaleX,
scaleY: clothingImage.scaleY,
left: clothingImage.left,
top: clothingImage.top,
originX: clothingImage.originX,