修复主屏容器在次页添加小组件会出现错位的bug
This commit is contained in:
parent
0f2ea87fe3
commit
1f00067af4
|
@ -247,10 +247,10 @@ export default class GaiaContainerChild {
|
|||
|
||||
const offsetTop = Math.abs(this.master.offsetTop)
|
||||
const offsetLeft = Math.abs(
|
||||
this.master.offsetLeft - this.pagination * this.manager.pageHeight
|
||||
this.master.offsetLeft - (this.master.parentElement?.offsetLeft ?? 0)
|
||||
)
|
||||
const rowStart = Math.floor(offsetTop / this.manager.gridHeight) + 1
|
||||
const columnStart = Math.floor(offsetLeft / this.manager.gridWidth) + 1
|
||||
const rowStart = Math.round(offsetTop / this.manager.gridHeight) + 1
|
||||
const columnStart = Math.round(offsetLeft / this.manager.gridWidth) + 1
|
||||
|
||||
return [rowStart, columnStart]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue