scale viewer

This commit is contained in:
hamid zarghami
2026-03-14 11:42:10 +03:30
parent b5a454a3fe
commit 27f57084e9
7 changed files with 82 additions and 31 deletions
+6 -2
View File
@@ -13,7 +13,11 @@ import ObjectsLayer from "./canvas/ObjectsLayer";
import CellEditor from "@/components/CellEditor";
import ZoomControls from "./ZoomControls";
const EditorCanvas = () => {
type EditorCanvasProps = {
catalogSize?: string;
};
const EditorCanvas = ({ catalogSize }: EditorCanvasProps) => {
const stageRef = useRef<Konva.Stage>(null);
const layerRef = useRef<Konva.Layer>(null);
@@ -30,7 +34,7 @@ const EditorCanvas = () => {
} = useEditorStore();
const { transformerRef, handleStageMouseDown, handleStageMouseMove, handleStageMouseUp } = useDrawingHandlers();
const stageSize = useStageSize();
const stageSize = useStageSize(catalogSize);
useKeyboardMovement();
const { handleSelect, handleCellClick, handleCellDblClick } = useSelectionHandlers();