@foblex/flow
Version:
An Angular library designed to simplify the creation and manipulation of dynamic flow. Provides components for flows, nodes, and connections, automating node manipulation and inter-node connections.
46 lines (45 loc) • 1.9 kB
TypeScript
import { EventEmitter, InjectionToken } from '@angular/core';
import { IPoint, IRect, ISize } from '@foblex/2d';
import { FConnectorBase } from '../f-connectors';
import { IHasHostElement } from '../i-has-host-element';
import { ISelectable } from '../mixins';
import { FChannel } from '../reactivity';
export declare const F_NODE: InjectionToken<FNodeBase>;
declare const MIXIN_BASE: import("../mixins").Constructor<ISelectable> & import("../mixins").AbstractConstructor<ISelectable> & {
new (hostElement: HTMLElement): {
hostElement: HTMLElement;
};
};
export declare abstract class FNodeBase extends MIXIN_BASE implements ISelectable, IHasHostElement {
abstract fId: string;
abstract fParentId: string | null | undefined;
readonly stateChanges: FChannel;
abstract positionChange: EventEmitter<IPoint>;
abstract position: IPoint;
protected _position: IPoint;
abstract rotateChange: EventEmitter<number>;
abstract rotate: number;
protected _rotate: number;
abstract sizeChange: EventEmitter<IRect>;
abstract size: ISize;
protected _size: ISize | undefined;
abstract fMinimapClass: string[] | string;
abstract fDraggingDisabled: boolean;
abstract fSelectionDisabled: boolean;
abstract fConnectOnNode: boolean;
fCanBeResizedByChild: boolean;
abstract fIncludePadding: boolean;
abstract refresh(): void;
connectors: FConnectorBase[];
protected abstract setStyle(name: string, value: string): void;
isContains(element: HTMLElement | SVGElement): boolean;
redraw(): void;
updatePosition(position: IPoint): void;
updateRotate(rotate: number): void;
updateSize(value: ISize): void;
setClass(className: string): void;
removeClass(className: string): void;
addConnector(connector: FConnectorBase): void;
removeConnector(connector: FConnectorBase): void;
}
export {};