fix build error
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
import { useEffect } from "react";
|
||||
import Konva from "konva";
|
||||
import { useEditorStore } from "../../store/editorStore";
|
||||
|
||||
export const useKeyboardMovement = () => {
|
||||
const { selectedObjectId, objects, updateObject, deleteObject, tool, layerRef } = useEditorStore();
|
||||
const {
|
||||
selectedObjectId,
|
||||
objects,
|
||||
updateObject,
|
||||
deleteObject,
|
||||
tool,
|
||||
layerRef,
|
||||
} = useEditorStore();
|
||||
|
||||
useEffect(() => {
|
||||
if (tool !== "select") {
|
||||
@@ -12,7 +18,11 @@ export const useKeyboardMovement = () => {
|
||||
|
||||
const handleKeyDown = (e: KeyboardEvent) => {
|
||||
const target = e.target as HTMLElement;
|
||||
if (target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.isContentEditable) {
|
||||
if (
|
||||
target.tagName === "INPUT" ||
|
||||
target.tagName === "TEXTAREA" ||
|
||||
target.isContentEditable
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -79,4 +89,3 @@ export const useKeyboardMovement = () => {
|
||||
};
|
||||
}, [selectedObjectId, objects, updateObject, deleteObject, tool, layerRef]);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user