961 : 외벽선 그리기 및 배치면 그리기에 대해서 外壁線を描く・配置面の描画について
1. "외벽선 그리기", "배치면 그리기"에서 선을 그을때 우클릭으로 "undo" 할 수 있도록 해주세요. 2. 마찬가지로 "외벽선 그리기", "배치면 그리기"로 지붕면을 확정할 때 Enter Key로 지붕면을 확정할 수 있도록 해주시기 바랍니다.
This commit is contained in:
parent
aa49e4c075
commit
59a55e4c88
@ -96,6 +96,10 @@ export function useOuterLineWall(id, propertiesId) {
|
||||
}
|
||||
|
||||
addCanvasMouseEventListener('mouse:down', mouseDown)
|
||||
addDocumentEventListener('contextmenu', document, (e) => {
|
||||
handleRollback()
|
||||
})
|
||||
|
||||
clear()
|
||||
return () => {
|
||||
initEvent()
|
||||
@ -690,6 +694,9 @@ export function useOuterLineWall(id, propertiesId) {
|
||||
if (points.length === 0) {
|
||||
return
|
||||
}
|
||||
if (e.key === 'Enter') {
|
||||
handleFix()
|
||||
}
|
||||
// 포커스가 length1에 있지 않으면 length1에 포커스를 줌
|
||||
const activeElem = document.activeElement
|
||||
if (activeElem !== length1Ref.current) {
|
||||
|
||||
@ -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