當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。