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