@univerjs/docs-ui
Version:
Univer normal ui-plugin-docs
48 lines (47 loc) • 1.98 kB
TypeScript
import { Nullable, DOC_RANGE_TYPE, RANGE_DIRECTION } from '@univerjs/core';
import { Documents, DocumentSkeleton, INodePosition, ITextSelectionStyle, Scene } from '@univerjs/engine-render';
import { IDocRange } from './range-interface';
export declare function convertPositionsToRectRanges(scene: Scene, document: Documents, docSkeleton: DocumentSkeleton, anchorNodePosition: INodePosition, focusNodePosition: INodePosition, style?: ITextSelectionStyle, segmentId?: string, segmentPage?: number): RectRange[];
export declare class RectRange implements IDocRange {
private _scene;
private _document;
private _docSkeleton;
anchorNodePosition: INodePosition;
focusNodePosition: INodePosition;
style: ITextSelectionStyle;
private _segmentId;
private _segmentPage;
rangeType: DOC_RANGE_TYPE;
private _rangeShape;
private _current;
private _startRow;
private _startCol;
private _endRow;
private _endCol;
private _tableId;
constructor(_scene: Scene, _document: Documents, _docSkeleton: DocumentSkeleton, anchorNodePosition: INodePosition, focusNodePosition: INodePosition, style?: ITextSelectionStyle, _segmentId?: string, _segmentPage?: number);
get startOffset(): Nullable<number>;
get endOffset(): Nullable<number>;
get collapsed(): boolean;
get startRow(): number;
get startColumn(): number;
get endRow(): number;
get endColumn(): number;
get tableId(): string;
get segmentId(): string;
get segmentPage(): number;
get spanEntireRow(): boolean;
get spanEntireColumn(): boolean;
get spanEntireTable(): boolean;
get startNodePosition(): INodePosition;
get endNodePosition(): INodePosition;
get direction(): RANGE_DIRECTION;
isActive(): boolean;
activate(): void;
deactivate(): void;
dispose(): void;
isIntersection(compareRange: RectRange): boolean;
refresh(): void;
private _updateTableInfo;
private _createOrUpdateRange;
}