import { Dom } from '@antv/x6-common'; import { Model, CellView } from '@antv/x6-core'; import { GridManager } from './grid'; import { BackgroundManager } from './background'; import { PanningManager } from './panning'; import { MouseWheel } from './mousewheel'; export declare namespace Options { interface Common { model?: Model; container: HTMLElement; x: number; y: number; width: number; height: number; autoResize?: boolean | Element | Document; background?: false | BackgroundManager.Options; scaling: { min?: number; max?: number; }; /** * When defined as a number, it denotes the required mousemove events * before a new edge is created from a magnet. When defined as keyword * 'onleave', the edge is created when the pointer leaves the magnet * DOM element. */ magnetThreshold: number | 'onleave'; /** * Number of required mousemove events before the first mousemove * event will be triggered. */ moveThreshold: number; /** * Allowed number of mousemove events after which the click event * will be still triggered. */ clickThreshold: number; /** * Prevent the default context menu from being displayed. */ preventDefaultContextMenu: boolean; preventDefaultDblClick: boolean; preventDefaultMouseDown: boolean; /** * Prevents default action when an empty graph area is clicked. * Setting the option to `false` will make the graph pannable * inside a container on touch devices. * * It defaults to `true`. */ preventDefaultBlankAction: boolean; /** * Guard the graph from handling a UI event. Returns `true` if you want * to prevent the graph from handling the event evt, `false` otherwise. * This is an advanced option that can be useful if you have your own * logic for handling events. */ guard: (e: Dom.EventObject, view?: CellView | null) => boolean; virtualRender?: boolean; connecting: any; interacting: any; translating: any; embedding: any; } export interface Manual extends Partial { grid?: boolean | number | (Partial & GridManager.DrawGridOptions); panning: boolean | Partial; mousewheel: boolean | Partial; } export interface Definition extends Common { grid: GridManager.Options; panning: PanningManager.Options; mousewheel: MouseWheel.Options; } export {}; } export declare namespace Options { function get(options: Partial): Definition; } export declare namespace Options { const defaults: Partial; }