当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript dnd-core.IDragDropMonitor类代码示例

本文整理汇总了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)
		}
开发者ID:Shintaroa,项目名称:react-dnd,代码行数:7,代码来源:createSourceFactory.ts

示例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
		}
	}
开发者ID:Shintaroa,项目名称:react-dnd,代码行数:14,代码来源:createSourceMonitor.ts

示例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
		}
	}
开发者ID:Shintaroa,项目名称:react-dnd,代码行数:14,代码来源:createTargetMonitor.ts

示例4: getInitialSourceClientOffset

	public getInitialSourceClientOffset() {
		return this.internalMonitor.getInitialSourceClientOffset()
	}
开发者ID:Shintaroa,项目名称:react-dnd,代码行数:3,代码来源:createTargetMonitor.ts

示例5: didDrop

	public didDrop() {
		return this.internalMonitor.didDrop()
	}
开发者ID:Shintaroa,项目名称:react-dnd,代码行数:3,代码来源:createTargetMonitor.ts

示例6: getDropResult

	public getDropResult() {
		return this.internalMonitor.getDropResult()
	}
开发者ID:Shintaroa,项目名称:react-dnd,代码行数:3,代码来源:createTargetMonitor.ts

示例7: getItem

	public getItem() {
		return this.internalMonitor.getItem()
	}
开发者ID:Shintaroa,项目名称:react-dnd,代码行数:3,代码来源:createTargetMonitor.ts

示例8: isOver

	public isOver(options: { shallow?: boolean }) {
		return this.internalMonitor.isOverTarget(this.targetId as string, options)
	}
开发者ID:Shintaroa,项目名称:react-dnd,代码行数:3,代码来源:createTargetMonitor.ts

示例9: isOverTarget

	public isOverTarget(
		targetId: string,
		options?: { shallow: boolean },
	): boolean {
		return this.internalMonitor.isOverTarget(targetId, options)
	}
开发者ID:Shintaroa,项目名称:react-dnd,代码行数:6,代码来源:createSourceMonitor.ts

示例10: canDropOnTarget

	public canDropOnTarget(targetId: string): boolean {
		return this.internalMonitor.canDropOnTarget(targetId)
	}
开发者ID:Shintaroa,项目名称:react-dnd,代码行数:3,代码来源:createSourceMonitor.ts


注:本文中的dnd-core.IDragDropMonitor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。