MCPcopy Create free account
hub / github.com/react-dnd/react-dnd / isImageNode

Function isImageNode

packages/react-dnd-html5-backend/src/OffsetUtils.js:29–34  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

27}
28
29function isImageNode(node) {
30 return node.nodeName === 'IMG' && (
31 isFirefox() ||
32 !document.documentElement.contains(node)
33 );
34}
35
36function getDragPreviewSize(isImage, dragPreview, sourceWidth, sourceHeight) {
37 let dragPreviewWidth = isImage ? dragPreview.width : sourceWidth;

Callers 1

getDragPreviewOffsetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected