Compare commits
No commits in common. "46f9385163be4096114cf7892bfe10c14c3068d8" and "24d8e14235f458fa0c1bb2d3fb5a91c93acd0bfc" have entirely different histories.
46f9385163
...
24d8e14235
@ -96,10 +96,6 @@ export function useOuterLineWall(id, propertiesId) {
|
||||
}
|
||||
|
||||
addCanvasMouseEventListener('mouse:down', mouseDown)
|
||||
addDocumentEventListener('contextmenu', document, (e) => {
|
||||
handleRollback()
|
||||
})
|
||||
|
||||
clear()
|
||||
return () => {
|
||||
initEvent()
|
||||
@ -694,7 +690,6 @@ export function useOuterLineWall(id, propertiesId) {
|
||||
if (points.length === 0) {
|
||||
return
|
||||
}
|
||||
enterCheck(e)
|
||||
// 포커스가 length1에 있지 않으면 length1에 포커스를 줌
|
||||
const activeElem = document.activeElement
|
||||
if (activeElem !== length1Ref.current) {
|
||||
@ -759,7 +754,6 @@ export function useOuterLineWall(id, propertiesId) {
|
||||
if (points.length === 0) {
|
||||
return
|
||||
}
|
||||
enterCheck(e)
|
||||
const key = e.key
|
||||
|
||||
const activeElem = document.activeElement
|
||||
@ -793,7 +787,6 @@ export function useOuterLineWall(id, propertiesId) {
|
||||
if (points.length === 0) {
|
||||
return
|
||||
}
|
||||
enterCheck(e)
|
||||
const key = e.key
|
||||
switch (key) {
|
||||
case 'Down': // IE/Edge에서 사용되는 값
|
||||
@ -819,7 +812,6 @@ export function useOuterLineWall(id, propertiesId) {
|
||||
if (points.length === 0) {
|
||||
return
|
||||
}
|
||||
enterCheck(e)
|
||||
const key = e.key
|
||||
switch (key) {
|
||||
case 'Enter': {
|
||||
@ -844,7 +836,7 @@ export function useOuterLineWall(id, propertiesId) {
|
||||
if (points.length === 0) {
|
||||
return
|
||||
}
|
||||
enterCheck(e)
|
||||
|
||||
const key = e.key
|
||||
switch (key) {
|
||||
case 'Down': // IE/Edge에서 사용되는 값
|
||||
@ -910,12 +902,6 @@ export function useOuterLineWall(id, propertiesId) {
|
||||
isFix.current = true
|
||||
}
|
||||
|
||||
const enterCheck = (e) => {
|
||||
if (e.key === 'Enter') {
|
||||
handleFix()
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
points,
|
||||
setPoints,
|
||||
|
||||
@ -92,9 +92,6 @@ export function usePlacementShapeDrawing(id) {
|
||||
}
|
||||
|
||||
addCanvasMouseEventListener('mouse:down', mouseDown)
|
||||
addDocumentEventListener('contextmenu', document, (e) => {
|
||||
handleRollback()
|
||||
})
|
||||
clear()
|
||||
}, [verticalHorizontalMode, points, adsorptionPointAddMode, adsorptionPointMode, adsorptionRange, interval, tempGridMode])
|
||||
|
||||
@ -178,7 +175,7 @@ export function usePlacementShapeDrawing(id) {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
mouseMove
|
||||
*/
|
||||
const roofs = canvas?.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF)
|
||||
@ -187,7 +184,7 @@ mouseMove
|
||||
const { getAdsorptionPoints } = useAdsorptionPoint()
|
||||
|
||||
const mouseMove = (e) => {
|
||||
removeMouseLine()
|
||||
removeMouseLine();
|
||||
const pointer = canvas.getPointer(e.e)
|
||||
const roofsPoints = roofs.map((roof) => roof.points).flat()
|
||||
roofAdsorptionPoints.current = [...roofsPoints]
|
||||
@ -249,6 +246,7 @@ mouseMove
|
||||
})
|
||||
canvas?.add(horizontalLine, verticalLine)
|
||||
canvas?.renderAll()
|
||||
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
@ -770,7 +768,6 @@ mouseMove
|
||||
if (points.length === 0) {
|
||||
return
|
||||
}
|
||||
enterCheck(e)
|
||||
// 포커스가 length1에 있지 않으면 length1에 포커스를 줌
|
||||
const activeElem = document.activeElement
|
||||
|
||||
@ -836,7 +833,6 @@ mouseMove
|
||||
if (points.length === 0) {
|
||||
return
|
||||
}
|
||||
enterCheck(e)
|
||||
const key = e.key
|
||||
|
||||
const activeElem = document.activeElement
|
||||
@ -870,7 +866,6 @@ mouseMove
|
||||
if (points.length === 0) {
|
||||
return
|
||||
}
|
||||
enterCheck(e)
|
||||
const key = e.key
|
||||
switch (key) {
|
||||
case 'Down': // IE/Edge에서 사용되는 값
|
||||
@ -896,7 +891,6 @@ mouseMove
|
||||
if (points.length === 0) {
|
||||
return
|
||||
}
|
||||
enterCheck(e)
|
||||
const key = e.key
|
||||
switch (key) {
|
||||
case 'Enter': {
|
||||
@ -921,7 +915,6 @@ mouseMove
|
||||
if (points.length === 0) {
|
||||
return
|
||||
}
|
||||
enterCheck(e)
|
||||
|
||||
const key = e.key
|
||||
switch (key) {
|
||||
@ -986,12 +979,6 @@ mouseMove
|
||||
isFix.current = true
|
||||
}
|
||||
|
||||
const enterCheck = (e) => {
|
||||
if (e.key === 'Enter') {
|
||||
handleFix()
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
points,
|
||||
setPoints,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user