-
Notifications
You must be signed in to change notification settings - Fork 0
AlignNode
hhh edited this page Jan 28, 2023
·
9 revisions
/**
* Type of align parameter.
*/
type AlignMode = 'begin' | 'center' | 'end';
/**
* Type of options of {@link AlignNode}.
*/
type AlignNodeOptions<Events extends CanvasNodeEvents> = (CanvasNodeOptions<Events> & Partial<{
/**
* Horizontal align.
* @default options.align
*/
alignX: AlignMode;
/**
* Vertical align.
* @default options.align
*/
alignY: AlignMode;
/**
* Default value of `alignX` and `alignY`.
* @default 'begin'
*/
align: AlignMode;
/**
* @override CanvasNodeOptions.penetrable
* @default true
*/
penetrable: boolean;
}>);
/**
* Class of container nodes that align child nodes.
*/
class AlignNode<Events extends CanvasNodeEvents = CanvasNodeEvents> extends CanvasNode<Events> {
/**
* Constructor of {@link AlignNode}.
*/
constructor(options?: AlignNodeOptions<Events>);
/**
* @override CanvasNode.tag
*/
readonly tag: string;
/**
* Horizontal align.
* @default 'begin'
*/
alignX: AlignMode;
/**
* Vertical align.
* @default 'begin'
*/
alignY: AlignMode;
/**
* @override CanvasNode.penetrable
* @default true
*/
penetrable: boolean;
/**
* @override CanvasNode.updateLayout
*/
protected updateLayout(timeStamp: number): void;
/**
* @override CanvasNode.getRecordOptions
*/
getRecordOptions(): NodeRecordOptions;
}