텍스트 모드시 config 창은 안닫히도록 수정
This commit is contained in:
parent
a47db47489
commit
272ff4f93f
@ -22,7 +22,7 @@ export function useCommonUtils() {
|
||||
const lengthTextFont = useRecoilValue(fontSelector('lengthText'))
|
||||
const commonTextFont = useRecoilValue(fontSelector('commonText'))
|
||||
const [commonUtils, setCommonUtilsState] = useRecoilState(commonUtilsState)
|
||||
const { addPopup, closeAll } = usePopup()
|
||||
const { addPopup, closeAll, targetClose } = usePopup()
|
||||
const { drawDirectionArrow, addLengthText } = usePolygon()
|
||||
const { applyDormers } = useObjectBatch({})
|
||||
|
||||
@ -38,8 +38,9 @@ export function useCommonUtils() {
|
||||
|
||||
const commonTextMode = () => {
|
||||
let textbox
|
||||
closeAll()
|
||||
|
||||
if (commonUtils.text) {
|
||||
targetClose('other')
|
||||
setTimeout(() => {
|
||||
commonTextKeyEvent()
|
||||
addCanvasMouseEventListener('mouse:down', (event) => {
|
||||
|
||||
@ -128,11 +128,17 @@ export function usePopup() {
|
||||
}
|
||||
}
|
||||
|
||||
const targetClose = (type) => {
|
||||
popup[type] = []
|
||||
setPopup({ ...popup, [type]: [] })
|
||||
}
|
||||
|
||||
return {
|
||||
popup,
|
||||
addPopup,
|
||||
closePopup,
|
||||
closePopups,
|
||||
closeAll,
|
||||
targetClose,
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user