feat: 更新红绿图设置逻辑,支持根据图像模式调整属性;修复笔刷类型同步问题
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user