UNPKG

@visactor/vrender-components

Version:

components library for dp visualization

69 lines (68 loc) 2.02 kB
import { AbstractComponent } from '../core/base'; import type { BrushAttributes } from './type'; import type { ComponentOptions } from '../interface'; export declare class Brush extends AbstractComponent<Required<BrushAttributes>> { name: string; static defaultAttributes: { trigger: string; updateTrigger: string; endTrigger: string[]; resetTrigger: string; hasMask: boolean; brushMode: string; brushType: string; brushStyle: { fill: string; fillOpacity: number; stroke: string; strokeWidth: number; }; brushMoved: boolean; removeOnClick: boolean; delayType: string; delayTime: number; interactiveRange: { minY: number; maxY: number; minX: number; maxX: number; }; }; private _container; private _activeBrushState; private _activeDrawState; private _cacheDrawPoints; private _activeMoveState; private _operatingMaskMoveDx; private _operatingMaskMoveDy; private _operatingMaskMoveRangeX; private _operatingMaskMoveRangeY; private _cacheMovePoint; private _operatingMask; private _brushMaskAABBBoundsDict; private _firstUpdate; private _startPos; constructor(attributes: BrushAttributes, options?: ComponentOptions); private _bindBrushEvents; private _onBrushStart; private _onBrushing; private _onBrushingWithDelay; private _onBrushEnd; private _onBrushClear; private _initDraw; private _initMove; private _drawing; private _moving; private _drawEnd; private _moveEnd; protected render(): void; releaseBrushEvents(): void; private _releaseBrushUpdateEvents; private _computeMaskPoints; private _addBrushMask; private _isPosInBrushMask; private _outOfInteractiveRange; private _dispatchBrushEvent; private _clearMask; private _isEmptyMask; }