모듈 열/단 버퍼 추가
This commit is contained in:
parent
8354508a2b
commit
9df16cad02
@ -991,14 +991,14 @@ export function useModule() {
|
||||
const getRowModules = (target) => {
|
||||
return canvas
|
||||
.getObjects()
|
||||
.filter((obj) => target.surfaceId === obj.surfaceId && obj.name === POLYGON_TYPE.MODULE && obj.top === target.top)
|
||||
.filter((obj) => target.surfaceId === obj.surfaceId && obj.name === POLYGON_TYPE.MODULE && Math.abs(obj.top - target.top) < 1)
|
||||
.sort((a, b) => a.left - b.left)
|
||||
}
|
||||
|
||||
const getColumnModules = (target) => {
|
||||
return canvas
|
||||
.getObjects()
|
||||
.filter((obj) => target.surfaceId === obj.surfaceId && obj.name === POLYGON_TYPE.MODULE && obj.left === target.left)
|
||||
.filter((obj) => target.surfaceId === obj.surfaceId && obj.name === POLYGON_TYPE.MODULE && Math.abs(obj.left - target.left) < 1)
|
||||
.sort((a, b) => a.top - b.top)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user