UNPKG

ts-mind

Version:

A web-mind lib write in typescript.Sound apis and friendly plug-in mechanism in this lib.

44 lines (43 loc) 1.44 kB
import TSMind from ".."; import { ITSMOptions } from "../../util/constants"; import { TSM_node } from "../node"; export default class draggable { tsm: TSMind; options: ITSMOptions; e_canvas: ITSMUnionNull<HTMLCanvasElement>; canvas_ctx: ITSMUnionNull<CanvasRenderingContext2D>; shadow: ITSMUnionNull<HTMLElement>; shadow_w: number; shadow_h: number; active_node: ITSMUnionNull<TSM_node>; target_node: ITSMUnionNull<TSM_node>; target_direct: ITSMUnionNull<ITSMDirectionValue>; client_w: number; client_h: number; client_hw: number; client_hh: number; offset_x: number; offset_y: number; private _drag_begun; private _drag_moved; constructor(tsm: TSMind, opts: ITSMOptions); resize: () => void; _create_canvas: () => void; _create_shadow: () => void; reset_shadow: (el: HTMLElement) => void; show_shadow: () => void; hide_shadow: () => void; clear_lines: () => void; _magnet_shadow: (node: ITSMDragCloseNodeData) => void; private _lookup_close_node; lookup_close_node: { (this: any): void; clear(): void; }; private _event_bind; dragstart: (e?: DragEvent | TouchEvent) => void; drag: (e?: Event) => void; dragend: (e?: Event) => void; move_node: (src_node: TSM_node, target_node: TSM_node, target_direct: ITSMDirectionValue) => void; event_handle: (type: ITSMEventTypeValue) => void; }