本文整理匯總了TypeScript中dnd-core.IDragDropMonitor類的典型用法代碼示例。如果您正苦於以下問題:TypeScript IDragDropMonitor類的具體用法?TypeScript IDragDropMonitor怎麽用?TypeScript IDragDropMonitor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了IDragDropMonitor類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: isDragging
public isDragging(globalMonitor: IDragDropMonitor, sourceId: string) {
if (!spec.isDragging) {
return sourceId === globalMonitor.getSourceId()
}
return spec.isDragging(this.props, this.monitor)
}
示例2: isDragging
public isDragging() {
invariant(
!isCallingIsDragging,
'You may not call monitor.isDragging() inside your isDragging() implementation. ' +
'Read more: http://react-dnd.github.io/react-dnd/docs-drag-source-monitor.html',
)
try {
isCallingIsDragging = true
return this.internalMonitor.isDraggingSource(this.sourceId as string)
} finally {
isCallingIsDragging = false
}
}
示例3: canDrop
public canDrop() {
invariant(
!isCallingCanDrop,
'You may not call monitor.canDrop() inside your canDrop() implementation. ' +
'Read more: http://react-dnd.github.io/react-dnd/docs-drop-target-monitor.html',
)
try {
isCallingCanDrop = true
return this.internalMonitor.canDropOnTarget(this.targetId as string)
} finally {
isCallingCanDrop = false
}
}
示例4: getInitialSourceClientOffset
public getInitialSourceClientOffset() {
return this.internalMonitor.getInitialSourceClientOffset()
}
示例5: didDrop
public didDrop() {
return this.internalMonitor.didDrop()
}
示例6: getDropResult
public getDropResult() {
return this.internalMonitor.getDropResult()
}
示例7: getItem
public getItem() {
return this.internalMonitor.getItem()
}
示例8: isOver
public isOver(options: { shallow?: boolean }) {
return this.internalMonitor.isOverTarget(this.targetId as string, options)
}
示例9: isOverTarget
public isOverTarget(
targetId: string,
options?: { shallow: boolean },
): boolean {
return this.internalMonitor.isOverTarget(targetId, options)
}
示例10: canDropOnTarget
public canDropOnTarget(targetId: string): boolean {
return this.internalMonitor.canDropOnTarget(targetId)
}