import type { RuntimeContext } from '../../runtime/types';
import type { ShortcutKey } from '../../utils/shortcut';
import type { BasePluginOptions } from '../base-plugin';
import { BasePlugin } from '../base-plugin';
/**
* 全屏配置项
*
* Full screen options
*/
export interface FullscreenOptions extends BasePluginOptions {
/**
* 触发全屏的方式
* - `request` : 请求全屏
* - `exit` : 退出全屏
*
* The way to trigger full screen
* - `request`: request full screen
* - `exit`: exit full screen
*/
trigger?: {
request?: ShortcutKey;
exit?: ShortcutKey;
};
/**
* 是否自适应画布尺寸,全屏后画布尺寸会自动适应屏幕尺寸
*
* Whether to adapt the canvas size
* @defaultValue true
*/
autoFit?: boolean;
/**
* 进入全屏后的回调
*
* Callback after entering full screen
*/
onEnter?: () => void;
/**
* 退出全屏后的回调
*
* Callback after exiting full screen
*/
onExit?: () => void;
}
/**
* 全屏
*
* Full screen
*/
export declare class Fullscreen extends BasePlugin {
static defaultOptions: Partial;
private shortcut;
private style;
private $el;
private graphSize;
constructor(context: RuntimeContext, options: FullscreenOptions);
private bindEvents;
private unbindEvents;
private setGraphSize;
private onFullscreenChange;
/**
* 请求全屏
*
* Request full screen
*/
request(): void;
/**
* 退出全屏
*
* Exit full screen
*/
exit(): void;
/**
* 更新配置
*
* Update options
* @param options - 配置项 | Options
* @internal
*/
update(options: Partial): void;
destroy(): void;
}