UNPKG

fps-flow

Version:

An easy and simple flow ui created by First Penny

32 lines (31 loc) 1.1 kB
import { NewNode, SavedNode } from "./interface"; export declare class FpNode { id: number; private hostContainer; private flowContainer; private savedNode?; data: any; text: string; getScale: () => number; handleConnection: (id: number) => boolean; updateConnections: () => void; removeNode: (id: number) => void; canvas: HTMLCanvasElement; nodeBody: HTMLElement; node: HTMLElement; private isDragging; private nodeColor; private nodeEdgeMovementHandler; constructor(id: number, hostContainer: HTMLElement, flowContainer: HTMLElement, savedNode?: SavedNode | NewNode); addChild(child: HTMLElement): void; /** * The flowcontainer callback function for handling movement of all nodes and connections when space required on left or top of container * making the items move to the other direction * @param cb */ handleItemsMovementCB(cb: (direction: 'top' | 'left', amount: number) => void): void; private createNode; private setPosition; private watchMovement; private handleMovement; }