fix:【仪表板】排版整齐后,通过新建视图,向仪表板中添加,位置有些错乱
This commit is contained in:
parent
18854ffa68
commit
bc82edafd1
@ -187,7 +187,7 @@ const list = [
|
||||
borderRadius: ''
|
||||
},
|
||||
x: 1,
|
||||
y: 1,
|
||||
y: 36,
|
||||
sizex: 10,
|
||||
sizey: 6,
|
||||
auxiliaryMatrix: true
|
||||
|
||||
@ -798,9 +798,19 @@ export default {
|
||||
}
|
||||
})
|
||||
|
||||
component.auxiliaryMatrix = this.canvasStyleData.auxiliaryMatrix
|
||||
// position = absolution 或导致有偏移 这里中和一下偏移量
|
||||
component.style.top = 0
|
||||
component.style.left = 600
|
||||
if (this.canvasStyleData.auxiliaryMatrix) {
|
||||
component.style.left = (component.x - 1) * this.curCanvasScale.matrixStyleOriginWidth
|
||||
component.style.top = (component.y - 1) * this.curCanvasScale.matrixStyleOriginHeight
|
||||
component.style.width = component.sizex * this.curCanvasScale.matrixStyleOriginWidth
|
||||
component.style.height = component.sizey * this.curCanvasScale.matrixStyleOriginHeight
|
||||
} else {
|
||||
component.style.left = 0
|
||||
component.style.top = 0
|
||||
component.x = 1
|
||||
component.y = 1
|
||||
}
|
||||
component.id = newComponentId
|
||||
this.$store.commit('addComponent', { component })
|
||||
this.$store.commit('recordSnapshot', 'newViewInfo')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user