本文整理匯總了TypeScript中dnd-core.IBackend類的典型用法代碼示例。如果您正苦於以下問題:TypeScript IBackend類的具體用法?TypeScript IBackend怎麽用?TypeScript IBackend使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了IBackend類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1:
connectBackend: (backend: IBackend, sourceId: string) => {
backend.connectDragSource(sourceId)
},
示例2:
connectBackend: (backend: IBackend, targetId: string) => {
backend.connectDropTarget(targetId)
},
示例3: reconnectDragPreview
function reconnectDragPreview() {
if (disconnectCurrentDragPreview) {
disconnectCurrentDragPreview()
disconnectCurrentDragPreview = undefined
}
if (currentHandlerId && currentDragPreviewNode) {
disconnectCurrentDragPreview = backend.connectDragPreview(
currentHandlerId,
currentDragPreviewNode,
currentDragPreviewOptions,
)
}
}
示例4: reconnectDropTarget
function reconnectDropTarget() {
if (disconnectCurrentDropTarget) {
disconnectCurrentDropTarget()
disconnectCurrentDropTarget = undefined
}
if (currentHandlerId && currentDropTargetNode) {
disconnectCurrentDropTarget = backend.connectDropTarget(
currentHandlerId,
currentDropTargetNode,
currentDropTargetOptions,
)
}
}
示例5: reconnectDragSource
function reconnectDragSource() {
if (disconnectCurrentDragSource) {
disconnectCurrentDragSource()
disconnectCurrentDragSource = undefined
}
if (currentHandlerId && currentDragSourceNode) {
disconnectCurrentDragSource = backend.connectDragSource(
currentHandlerId,
currentDragSourceNode,
currentDragSourceOptions,
)
}
}