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