本文整理汇总了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)
}