更新描述文档;

修复了若干错误;
This commit is contained in:
2025-10-05 02:26:50 +08:00
parent d70e9e62b8
commit e30e5b4fe2
13 changed files with 229 additions and 312 deletions

View File

@@ -1,6 +1,7 @@
import React, { useRef, useEffect, useState, useCallback } from 'react';
import { Stage, Layer, Image as KonvaImage, Line } from 'react-konva';
import type { KonvaEventObject } from 'konva/lib/Node';
import type { Stage as StageType } from 'konva/lib/Stage';
import { useAppStore } from '../store/useAppStore';
import { Button } from './ui/Button';
import { ZoomIn, ZoomOut, RotateCcw, Download } from 'lucide-react';
@@ -24,7 +25,7 @@ export const ImageCanvas: React.FC = () => {
showPromptPanel
} = useAppStore();
const stageRef = useRef<any>(null);
const stageRef = useRef<StageType>(null);
const [image, setImage] = useState<HTMLImageElement | null>(null);
const [stageSize, setStageSize] = useState({ width: 800, height: 600 });
const [isDrawing, setIsDrawing] = useState(false);