모드에 따른 keyboard 이벤트 추가
This commit is contained in:
parent
13b57dae23
commit
86e863e240
@ -219,7 +219,7 @@ export function useMode() {
|
|||||||
canvas?.renderAll()
|
canvas?.renderAll()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 각 모드에 따른 마우스 이벤트 변경
|
// 모드에 따른 마우스 이벤트 변경
|
||||||
const changeMouseEvent = (mode) => {
|
const changeMouseEvent = (mode) => {
|
||||||
canvas?.off('mouse:down')
|
canvas?.off('mouse:down')
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
@ -247,6 +247,9 @@ export function useMode() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 모드에 따른 키보드 이벤트 변경
|
||||||
|
const changeKeyboardEvent = (mode) => {}
|
||||||
|
|
||||||
const keyValid = () => {
|
const keyValid = () => {
|
||||||
if (points.current.length === 0) {
|
if (points.current.length === 0) {
|
||||||
alert('시작점을 선택해주세요')
|
alert('시작점을 선택해주세요')
|
||||||
@ -474,6 +477,7 @@ export function useMode() {
|
|||||||
setCanvas(canvas)
|
setCanvas(canvas)
|
||||||
|
|
||||||
changeMouseEvent(mode)
|
changeMouseEvent(mode)
|
||||||
|
changeKeyboardEvent(mode)
|
||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case 'template':
|
case 'template':
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user