Skip to content
DragDropOperation

界面 / DragDropOperation

DragDropOperation Class
​

UI 拖拽事件

Table of contents ​

Methods
​

equal(other: DragDropOperation): boolean client
判断是否相同
getDragPivot(): DragPivot client
获取拖拽锚点
getDragVisualWidget(): Widget client
获取拖拽显示的UI
getOffset(): Vector2 client
获取拖拽UI的百分比偏移
getTag(): string client
获取Tag 标签
tryGetDragDropPayLoad(): DragDropPayLoad client
获取传递的数据信息
tryGetDragDropPayLoadAs<T: extends DragDropPayLoad<T>>(): T: extends DragDropPayLoad<T> client
获取传递的数据信息

• Private new DragDropOperation()

Methods ​

equal
​

• equal(other): boolean client

判断是否相同

Parameters ​

other DragDropOperation另一个UI拖拽事件

Returns ​

booleanboolean

getDragPivot
​

• getDragPivot(): DragPivot client

获取拖拽锚点

Returns ​

DragPivot拖拽锚点

getDragVisualWidget
​

• getDragVisualWidget(): Widget client

获取拖拽显示的UI

Returns ​

Widget拖拽显示的UI

getOffset
​

• getOffset(): Vector2 client

获取拖拽UI的百分比偏移

Returns ​

Vector2百分比偏移

getTag
​

• getTag(): string client

获取Tag 标签

Returns ​

string返回tag

tryGetDragDropPayLoad
​

• tryGetDragDropPayLoad(): DragDropPayLoad client

获取传递的数据信息

Returns ​

DragDropPayLoad数据信息

tryGetDragDropPayLoadAs
​

• tryGetDragDropPayLoadAs<T>(): T client

获取传递的数据信息

Returns ​

T数据信息

Type parameters ​

Textends DragDropPayLoad<T>