forked from alibaba/lowcode-engine
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdetecting.ts
More file actions
46 lines (39 loc) · 932 Bytes
/
detecting.ts
File metadata and controls
46 lines (39 loc) · 932 Bytes
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
import { IPublicModelNode } from './';
import { IPublicTypeDisposable } from '../type';
export interface IPublicModelDetecting<Node = IPublicModelNode> {
/**
* 是否启用
* check if current detecting is enabled
* @since v1.1.0
*/
get enable(): boolean;
/**
* 当前 hover 的节点
* get current hovering node
* @since v1.0.16
*/
get current(): Node | null;
/**
* hover 指定节点
* capture node with nodeId
* @param id 节点 id
*/
capture(id: string): void;
/**
* hover 离开指定节点
* release node with nodeId
* @param id 节点 id
*/
release(id: string): void;
/**
* 清空 hover 态
* clear all hover state
*/
leave(): void;
/**
* hover 节点变化事件
* set callback which will be called when hovering object changed.
* @since v1.1.0
*/
onDetectingChange(fn: (node: Node | null) => void): IPublicTypeDisposable;
}