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