Compare commits
20 Commits
24d8e14235
...
46f9385163
| Author | SHA1 | Date | |
|---|---|---|---|
| 46f9385163 | |||
| 59a55e4c88 | |||
| aa49e4c075 | |||
| 96e989aa40 | |||
| 00ed6f250b | |||
| 80bf9263fd | |||
| 5c03e631ae | |||
| 8a49f7169b | |||
| 6dcf9b6836 | |||
| 55d37af144 | |||
| c9e0650e6a | |||
| 01dda7e43e | |||
| 555671ade7 | |||
| 8b80277884 | |||
| fb297b9a0a | |||
| aa85de5280 | |||
| 9b6c6cdfae | |||
| ae789672b4 | |||
| 105158e298 | |||
| 772f465f9d |
@ -96,6 +96,10 @@ export function useOuterLineWall(id, propertiesId) {
|
||||
}
|
||||
|
||||
addCanvasMouseEventListener('mouse:down', mouseDown)
|
||||
addDocumentEventListener('contextmenu', document, (e) => {
|
||||
handleRollback()
|
||||
})
|
||||
|
||||
clear()
|
||||
return () => {
|
||||
initEvent()
|
||||
@ -690,6 +694,7 @@ export function useOuterLineWall(id, propertiesId) {
|
||||
if (points.length === 0) {
|
||||
return
|
||||
}
|
||||
enterCheck(e)
|
||||
// 포커스가 length1에 있지 않으면 length1에 포커스를 줌
|
||||
const activeElem = document.activeElement
|
||||
if (activeElem !== length1Ref.current) {
|
||||
@ -754,6 +759,7 @@ export function useOuterLineWall(id, propertiesId) {
|
||||
if (points.length === 0) {
|
||||
return
|
||||
}
|
||||
enterCheck(e)
|
||||
const key = e.key
|
||||
|
||||
const activeElem = document.activeElement
|
||||
@ -787,6 +793,7 @@ export function useOuterLineWall(id, propertiesId) {
|
||||
if (points.length === 0) {
|
||||
return
|
||||
}
|
||||
enterCheck(e)
|
||||
const key = e.key
|
||||
switch (key) {
|
||||
case 'Down': // IE/Edge에서 사용되는 값
|
||||
@ -812,6 +819,7 @@ export function useOuterLineWall(id, propertiesId) {
|
||||
if (points.length === 0) {
|
||||
return
|
||||
}
|
||||
enterCheck(e)
|
||||
const key = e.key
|
||||
switch (key) {
|
||||
case 'Enter': {
|
||||
@ -836,7 +844,7 @@ export function useOuterLineWall(id, propertiesId) {
|
||||
if (points.length === 0) {
|
||||
return
|
||||
}
|
||||
|
||||
enterCheck(e)
|
||||
const key = e.key
|
||||
switch (key) {
|
||||
case 'Down': // IE/Edge에서 사용되는 값
|
||||
@ -902,6 +910,12 @@ export function useOuterLineWall(id, propertiesId) {
|
||||
isFix.current = true
|
||||
}
|
||||
|
||||
const enterCheck = (e) => {
|
||||
if (e.key === 'Enter') {
|
||||
handleFix()
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
points,
|
||||
setPoints,
|
||||
|
||||
@ -92,6 +92,9 @@ export function usePlacementShapeDrawing(id) {
|
||||
}
|
||||
|
||||
addCanvasMouseEventListener('mouse:down', mouseDown)
|
||||
addDocumentEventListener('contextmenu', document, (e) => {
|
||||
handleRollback()
|
||||
})
|
||||
clear()
|
||||
}, [verticalHorizontalMode, points, adsorptionPointAddMode, adsorptionPointMode, adsorptionRange, interval, tempGridMode])
|
||||
|
||||
@ -175,7 +178,7 @@ export function usePlacementShapeDrawing(id) {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
mouseMove
|
||||
*/
|
||||
const roofs = canvas?.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF)
|
||||
@ -184,7 +187,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]
|
||||
@ -246,7 +249,6 @@ mouseMove
|
||||
})
|
||||
canvas?.add(horizontalLine, verticalLine)
|
||||
canvas?.renderAll()
|
||||
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
@ -768,6 +770,7 @@ mouseMove
|
||||
if (points.length === 0) {
|
||||
return
|
||||
}
|
||||
enterCheck(e)
|
||||
// 포커스가 length1에 있지 않으면 length1에 포커스를 줌
|
||||
const activeElem = document.activeElement
|
||||
|
||||
@ -833,6 +836,7 @@ mouseMove
|
||||
if (points.length === 0) {
|
||||
return
|
||||
}
|
||||
enterCheck(e)
|
||||
const key = e.key
|
||||
|
||||
const activeElem = document.activeElement
|
||||
@ -866,6 +870,7 @@ mouseMove
|
||||
if (points.length === 0) {
|
||||
return
|
||||
}
|
||||
enterCheck(e)
|
||||
const key = e.key
|
||||
switch (key) {
|
||||
case 'Down': // IE/Edge에서 사용되는 값
|
||||
@ -891,6 +896,7 @@ mouseMove
|
||||
if (points.length === 0) {
|
||||
return
|
||||
}
|
||||
enterCheck(e)
|
||||
const key = e.key
|
||||
switch (key) {
|
||||
case 'Enter': {
|
||||
@ -915,6 +921,7 @@ mouseMove
|
||||
if (points.length === 0) {
|
||||
return
|
||||
}
|
||||
enterCheck(e)
|
||||
|
||||
const key = e.key
|
||||
switch (key) {
|
||||
@ -979,6 +986,12 @@ mouseMove
|
||||
isFix.current = true
|
||||
}
|
||||
|
||||
const enterCheck = (e) => {
|
||||
if (e.key === 'Enter') {
|
||||
handleFix()
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
points,
|
||||
setPoints,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user