forked from alibaba/lowcode-engine
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsimulator-host.ts
More file actions
51 lines (43 loc) · 1.2 KB
/
simulator-host.ts
File metadata and controls
51 lines (43 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import { IPublicModelNode, IPublicModelSimulatorRender } from '../model';
export interface IPublicApiSimulatorHost {
/**
* 获取 contentWindow
* @experimental unstable api, pay extra caution when trying to use it
*/
get contentWindow(): Window | undefined;
/**
* 获取 contentDocument
* @experimental unstable api, pay extra caution when trying to use it
*/
get contentDocument(): Document | undefined;
/**
* @experimental unstable api, pay extra caution when trying to use it
*/
get renderer(): IPublicModelSimulatorRender | undefined;
/**
* 设置若干用于画布渲染的变量,比如画布大小、locale 等。
* set config for simulator host, eg. device locale and so on.
* @param key
* @param value
*/
set(key: string, value: any): void;
/**
* 获取模拟器中设置的变量,比如画布大小、locale 等。
* set config value by key
* @param key
* @returns
*/
get(key: string): any;
/**
* 滚动到指定节点
* scroll to specific node
* @param node
* @since v1.1.0
*/
scrollToNode(node: IPublicModelNode): void;
/**
* 刷新渲染画布
* make simulator render again
*/
rerender(): void;
}