UNPKG

@antv/s2

Version:

effective spreadsheet render core lib

39 lines (38 loc) 1.96 kB
import type { PointLike } from '@antv/g'; import { RowCell } from '../../cell'; import { ScrollDirection } from '../../common/constant/interaction'; import type { BrushRange, OnUpdateCells, ViewMeta } from '../../common/interface'; import type { Node } from '../../facet/layout/node'; import { BaseBrushSelection } from './base-brush-selection'; export declare class RowCellBrushSelection extends BaseBrushSelection { displayedCells: RowCell[]; brushRangeCells: RowCell[]; protected bindMouseDown(): void; protected isPointInCanvas(point: PointLike): boolean; protected bindMouseMove(): void; protected setDisplayedCells(): void; protected isInBrushRange: (meta: ViewMeta | Node) => boolean; protected updateSelectedCells(event: MouseEvent): void; protected addBrushIntercepts(): void; protected onUpdateCells: OnUpdateCells; private getSelectedRowNodes; private getScrollBrushRangeCells; /** * 行头的非叶子节点滚动刷选, 以当前节点所对应 [可视范围] 内叶子节点为基准 * 例: 当前刷选 [浙江省] 行头的这一列, 向 🔽 滚动以 [纸张] 为准, 向 🔼滚动以 [桌子] 为准 --------------------------------------- * | | 杭州市 | 家具 | 🔼 [桌子] | * | | | | 沙发 | * | | | 办公用品 | 笔 | * | | | | 纸张 | * | 浙江省 | | | | * | | 绍兴市 | 家具 | 桌子 | * | | | | 沙发 | * | | | 办公用品 | 笔 | * | | | | 🔽 [纸张] | * ------------------------------------- */ private getVisibleRowLeafCellByScrollDirection; protected getWillScrollToRowIndex: (dir: ScrollDirection) => number | null; protected getPrepareSelectMaskPosition(brushRange: BrushRange): PointLike; }