import { DMMF } from "@prisma/generator-helper";
import { Connection } from "./connection";
import { Model } from "./model";
import { Timer } from "./timer";
import { Vec } from "./vector";
interface MyTouch {
    identifier: number;
    pageX: number;
    pageY: number;
    dragged_model: number;
    dragged_model_offset: Vec;
    timer: Timer;
    last_pos: Vec;
}
export declare class Canvas {
    origin: number;
    models: Model[];
    radius: number;
    connections: Connection[];
    canvas: HTMLCanvasElement;
    timer: Timer;
    hover_model: number;
    dragged_model: number;
    dragged_model_offset: Vec;
    ongoingTouches: MyTouch[];
    num_touch_start: number;
    datamodel: DMMF.Datamodel;
    ctx: CanvasRenderingContext2D | null;
    simulate: boolean;
    mouseStart: Vec | null;
    selection: Model[];
    scaleFactor: number;
    panX: number;
    panY: number;
    shiftDown: boolean;
    mouseDown: boolean;
    constructor(canvasid: string, datamodel: DMMF.Datamodel);
    updateDatamodel(datamodel: DMMF.Datamodel): void;
    init_rand: (model: Model) => void;
    loadSprings(): Connection[];
    init_world: () => void;
    get_dragged_indexes: () => number[];
    find_model: (point: Vec) => number;
    point_from_event: (event: MouseEvent, scaled?: boolean) => Vec;
    mouseup: () => void;
    mousedown: (event: MouseEvent) => void;
    mousemove: (event: MouseEvent) => void;
    draw: () => void;
    handleKeyDown: (ev: KeyboardEvent) => void;
    handleKeyUp: (ev: KeyboardEvent) => void;
    handleScroll: (ev: WheelEvent) => void;
    attach_handlers: () => void;
}
export {};
