refactor: 矩阵密度适配

This commit is contained in:
wangjiahao 2022-04-20 13:28:36 +08:00
parent ded3fb29cb
commit 3e8fec74d5

View File

@ -96,10 +96,10 @@ export function panelInit(componentData, componentStyle) {
item.sizey = (item.sizey || 5)
// 初始化密度为最高密度
if (componentStyle.aidedDesign.matrixBase !== 4) {
item.x = (item.x - 1) * componentStyle.aidedDesign.matrixBase + 1
item.y = (item.y - 1) * componentStyle.aidedDesign.matrixBase + 1
item.sizex = item.sizex * componentStyle.aidedDesign.matrixBase
item.sizey = item.sizey * componentStyle.aidedDesign.matrixBase
item.x = (item.x - 1) * 4 + 1
item.y = (item.y - 1) * 4 + 1
item.sizex = item.sizex * 4
item.sizey = item.sizey * 4
}
item.mobileSelected = (item.mobileSelected || false)
item.mobileStyle = (item.mobileStyle || deepCopy(BASE_MOBILE_STYLE))