| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import type { LayoutRegistry } from '@antv/g-lite';
- import type { LayoutContextFactory } from './LayoutContext';
- import type { LayoutEdgesFactory } from './LayoutEdges';
- import type { LayoutFragmentOptions } from './LayoutFragment';
- import type { LayoutObject } from './LayoutObject';
- import type { LayoutWorkTask } from './LayoutWorkTask';
- import type { IntrinsicSizes, LayoutConstraints } from './types';
- export declare class LayoutEngine {
- protected readonly _layoutRegistry: LayoutRegistry;
- protected readonly _layoutContextFactory: LayoutContextFactory;
- protected readonly _layoutEdgesFactory: LayoutEdgesFactory;
- protected layoutRegistry: LayoutRegistry;
- protected layoutContextFactory: LayoutContextFactory;
- protected layoutEdgesFactory: LayoutEdgesFactory;
- constructor(_layoutRegistry: LayoutRegistry, _layoutContextFactory: LayoutContextFactory, _layoutEdgesFactory: LayoutEdgesFactory);
- /**
- * This function takes the root of the box-tree, a LayoutConstraints object, and compute the position of every node in the tree
- * @param rootNode root node of the layout object tree
- * @param rootPageConstraints layout constraints
- * @returns
- */
- computeLayout(rootNode: LayoutObject, rootPageConstraints: LayoutConstraints): Promise<void>;
- /**
- * calculate intrinsicSize of node tree, use depth dirst / post order traversal
- * @param rootNode
- */
- determineAllIntrinsicSizes(rootNode: LayoutObject): Promise<void>;
- protected getLayoutDefinitionName(node: LayoutObject): any;
- /**
- * calculate the min/max content size of node
- * @param node current layout object
- * @param childNodes children of the current node
- */
- protected determineIntrinsicSizes(node: LayoutObject, childNodes: LayoutObject[]): Promise<void>;
- protected invokeIntrinsicSizesCallback(layoutName: string, node: LayoutObject, childNodes: LayoutObject[]): Promise<void>;
- protected calculateLayout(node: LayoutObject, childNodes: LayoutObject[], layoutConstraints: LayoutConstraints): Promise<void>;
- protected invokeLayoutCallback(layoutName: string, node: LayoutObject, childNodes: LayoutObject[], layoutConstraints: LayoutConstraints): Promise<void>;
- protected runWorkQueue<T>(promise: Promise<T>, workQueue: LayoutWorkTask[]): Generator<any, T, any>;
- protected getNodeIntrisicSizes(node: LayoutObject): IntrinsicSizes;
- protected getNodeFragment(node: LayoutObject, constraints: LayoutConstraints): LayoutFragmentOptions;
- }
- //# sourceMappingURL=LayoutEngine.d.ts.map
|