| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- import type { CSSStyleValue, ParsedBaseStyleProps } from '@antv/g-lite';
- import type { LayoutFragment } from './LayoutFragment';
- import type { IntrinsicSizes, MeasureFn } from './types';
- interface LayoutObjectIntrinsicSizes {
- minContentInlineSize: number;
- minContentBlockSize: number;
- maxContentInlineSize: number;
- maxContentBlockSize: number;
- }
- export declare class LayoutObject {
- private id;
- private style;
- private dirty;
- parent?: LayoutObject;
- children: LayoutObject[];
- private internalIntrisicSizes?;
- private computedLayout?;
- get intrisicSizes(): LayoutObjectIntrinsicSizes;
- get childCount(): number;
- private measureFn?;
- constructor(style?: Map<string, any>);
- /**
- * set the intrinsic size of leaf node, different basic shape has different size, compsed shape has
- * @param measure measure function
- */
- setMeasure(measure: MeasureFn): void;
- setIntrisicSizes(intrisicSizes: IntrinsicSizes): void;
- addChild(child: LayoutObject): void;
- insertChild(index: number, child: LayoutObject): void;
- removeChild(child: LayoutObject): void;
- removeChildAtIndex(index: number): void;
- replaceChildAtIndex(index: number, child: LayoutObject): void;
- setStyle(property: keyof ParsedBaseStyleProps, value: CSSStyleValue): void;
- getStyle(...properties: string[]): Map<any, any>;
- getAllStyle(): Map<string, any>;
- markDirty(): void;
- idDirty(): boolean;
- private getSize;
- computeLayout(): Promise<void>;
- setComputedLayout(computedLayout: LayoutFragment): void;
- getComputedLayout(): LayoutFragment<void>;
- getAllComputedLayout(): void;
- toString(): string;
- }
- export {};
- //# sourceMappingURL=LayoutObject.d.ts.map
|