import type { FabricObject } from '../shapes/Object/FabricObject'; import type { LayoutStrategy } from './LayoutStrategies/LayoutStrategy'; import type { LayoutContext, LayoutResult, RegistrationContext, StrictLayoutContext } from './types'; export type SerializedLayoutManager = { type: string; strategy: string; }; export declare class LayoutManager { private _prevLayoutStrategy?; protected _subscriptions: Map; strategy: LayoutStrategy; constructor(strategy?: LayoutStrategy); performLayout(context: LayoutContext): void; /** * Attach handlers for events that we know will invalidate the layout when * performed on child objects ( general transforms ). * Returns the disposers for later unsubscribing and cleanup * @param {FabricObject} object * @param {RegistrationContext & Partial} context * @returns {VoidFunction[]} disposers remove the handlers */ protected attachHandlers(object: FabricObject, context: RegistrationContext & Partial): VoidFunction[]; /** * Subscribe an object to transform events that will trigger a layout change on the parent * This is important only for interactive groups. * @param object * @param context */ protected subscribe(object: FabricObject, context: RegistrationContext & Partial): void; /** * unsubscribe object layout triggers */ protected unsubscribe(object: FabricObject, _context?: RegistrationContext & Partial): void; unsubscribeTargets(context: RegistrationContext & Partial): void; subscribeTargets(context: RegistrationContext & Partial): void; protected onBeforeLayout(context: StrictLayoutContext): void; protected getLayoutResult(context: StrictLayoutContext): Required | undefined; protected commitLayout(context: StrictLayoutContext, layoutResult: Required): void; protected layoutObjects(context: StrictLayoutContext, layoutResult: Required): void; /** * @param {FabricObject} object * @param {Point} offset */ protected layoutObject(context: StrictLayoutContext, { offset }: Required, object: FabricObject): void; protected onAfterLayout(context: StrictLayoutContext, layoutResult?: LayoutResult): void; dispose(): void; toObject(): { type: string; strategy: string; }; toJSON(): { type: string; strategy: string; }; } //# sourceMappingURL=LayoutManager.d.ts.map