@visactor/vtable
Version:
canvas table width high performance
37 lines (36 loc) • 1.22 kB
TypeScript
import type { IGroupGraphicAttribute } from './../../vrender';
import { RichText, Text } from './../../vrender';
import { Group } from '../graphic/group';
import { Icon, TextIcon } from '../graphic/icon';
interface ICellContentOption {
autoWidth: boolean;
autoHeight: boolean;
cellWidth: number;
cellHeight: number;
align: CanvasTextAlign;
baseline: CanvasTextBaseline;
}
export declare class CellContent extends Group {
_leftGroup: Group;
_rightGroup: Group;
_centerGroup: Group;
_autoWidth: boolean;
_autoHeight: boolean;
_cellWidth: number;
_originCellWidth: number;
_cellHeight: number;
_align: CanvasTextAlign;
_baseline: CanvasTextBaseline;
constructor(params: IGroupGraphicAttribute);
setCellContentOption(option: ICellContentOption): void;
addLeftOccupyingIcon(icon: Icon | TextIcon): void;
addRightOccupyingIcon(icon: Icon | TextIcon): void;
addContent(content: Icon | TextIcon | Text | RichText): void;
layout(): void;
updateCenterLayout(contentWidth: number): void;
updateHorizontalPos(): void;
updateVerticalPos(): void;
updateWidth(width: number): void;
updateHeight(height: number): void;
}
export {};