import React from 'react'; import { Connection, Node, Point } from './Models'; declare type ViewType = { width: number; height: number; x: number; y: number; scale: number; offsetTop?: number; offsetLeft?: number; }; declare type ConnectionInProgress = { from: Node; to: Point; }; declare type State = { view: ViewType; connectionInProgress?: ConnectionInProgress; closestNode?: Node; visibility: string; }; declare type CanvasProps = { nodes: Node[]; connections: Connection[]; selectedNode: Node | null; selectNode: (node: Node | null) => void; updateNode: (node: Node) => void; selectConnection: (conn: Connection | null) => void; selectedConnection: Connection | null; createConnection: (fromNode: Node, toNode: Node) => void; removeConnection: (conn: Connection) => void; snapToGrid: boolean; showGrid: boolean; }; declare class Canvas extends React.Component { MIN_SCALE: number; MAX_SCALE: number; velocity: { x: number; y: number; }; friction: number; domNode: React.RefObject; private em; private animationFrame?; state: State; setView(): void; componentDidMount(): void; componentWillUnmount(): void; setCanvasSize: any; setScale: (scale: any, location: any) => void; convertCoordsToSVG: (x: any, y: any) => Point; getTransform: () => string; _onWheel: (event: any) => void; _onTap: () => void; _onPinch: (e: any) => void; _onMove: (e: any) => void; _onMoveEnd: (e: any) => void; zoomie: () => void; glideCanvas: () => void; onConnectionDrag: (node: Node, e: CustomEvent) => void; onConnectionEnd: (node: Node) => void; setClosestNode: (mouse: Point) => void; getClosestInPortNode: (loc: Point) => Node | undefined; render(): JSX.Element; } export default Canvas;