| 12345678910111213141516171819202122232425262728293031323334 |
- declare module 'fabric' {
- interface FabricObject {
- id: `${string}-${string}-${string}-${string}-${string}`;
- lockScaleUniform: boolean;
- maxScaleLimit: number;
- }
- interface FabricObjectProps {
- lockScaleUniform?: boolean;
- maxScaleLimit?: number;
- }
- interface CanvasEvents {
- 'before:object:created': { object: import('fabric').FabricObject };
- 'object:created': { object: import('fabric').FabricObject };
- 'brush:invalid': {
- reason: 'outOfRegion' | 'dragTooShort' | 'selfIntersection' | 'degenerateTriangle' | 'closeWouldIntersect' | 'polygonTooFewPoints' | 'dragBoundsInvalid';
- point: { x: number; y: number };
- vertexCount?: number;
- detail?: Record<string, unknown>;
- };
- 'brush:start': {
- shape?: 'rect' | 'circle' | 'ellipse' | 'triangle' | 'polyline' | 'polygon';
- };
- 'brush:end': {
- shape?: 'rect' | 'circle' | 'ellipse' | 'triangle' | 'polyline' | 'polygon';
- };
- }
- interface ObjectEvents {
- 'snapshot:start': { target: import('fabric').FabricObject };
- 'snapshot:end': { target: import('fabric').FabricObject };
- }
- }
- export {};
|