feat(新功能): fix(修复bug):design的宽度自适应-宽度算法修复 refactor(重构): test(增加测试):

This commit is contained in:
zhh
2025-09-26 13:20:26 +08:00
parent e966ed5aa5
commit 95647be610

View File

@@ -207,7 +207,9 @@ def update_base_size_priority(layers, size):
if info['name'] == 'mannequin':
new_height = info['image'].height
max_x = max(x_list)
new_width = max_x - min_x * 2
# x坐标中最小偏移量的绝对值 + 最大偏移量
new_width = max_x + abs(min_x)
# 更新坐标
for info in layers:
info['adaptive_position'] = (info['position'][0], info['position'][1] - min_x)