import type { Canvas, DisplayObject, Rect, RenderingPlugin, RenderingPluginContext } from '@antv/g-lite'; import type { Selectable } from './selectable/interface'; import type { AnnotationPluginOptions } from './tokens'; /** * Make shape selectable and interactive. * @see http://fabricjs.com/ * * @example * circle.style.selectable = true; * * Support the following selection: * * * Use pointerdown to select a single graphic. * * Press `shift` key to multi-select graphics. * * Use brush selection. */ export declare class SelectablePlugin implements RenderingPlugin { annotationPluginOptions: AnnotationPluginOptions; static tag: string; constructor(annotationPluginOptions: AnnotationPluginOptions); /** * the topmost operation layer, which will be appended to documentElement directly */ private activeSelectableLayer; /** * Brush for multi-selection. */ private brush; /** * selected objects on current canvas */ selected: DisplayObject[]; /** * each selectable has an operation UI */ private selectableMap; /** * draw a dashed rect when brushing */ brushRect: Rect; canvas: Canvas; /** * Toggle visibility of mid anchors */ midAnchorsVisible: boolean; /** * Toggle visibility of rotate anchor */ rotateAnchorVisible: boolean; getSelectedDisplayObjects(): DisplayObject[]; selectDisplayObject(displayObject: DisplayObject, skipEvent?: boolean): void; deselectDisplayObject(displayObject: DisplayObject): void; /** * Need re-create SelectableUI for object since its definition was already changed. */ markSelectableUIAsDirty(object: DisplayObject): void; private deselectAllDisplayObjects; getOrCreateSelectableUI(object: DisplayObject): Selectable; /** * Update all existed selectable UIs. * @example * * plugin.updateSelectableStyle({ * selectionStroke: 'red', * }); */ updateSelectableStyle(): void; private updateMidAnchorsVisibility; private updateRotateAnchorVisibility; private updateAnchorsSelectable; showMidAnchors(): void; hideMidAnchors(): void; showRotateAnchor(): void; hideRotateAnchor(): void; enableAnchorsSelectable(): void; disableAnchorsSelectable(): void; apply(context: RenderingPluginContext): void; private renderDrawer; private hideDrawer; } //# sourceMappingURL=SelectablePlugin.d.ts.map