MCPcopy Create free account
hub / github.com/SplootCode/splootcode / render

Method render

packages/editor/src/components/drag_overlay.tsx:17–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15@observer
16export class DragOverlay extends React.Component<OverlayProps> {
17 render() {
18 const { selection, editorRef } = this.props
19 const dragState = selection.dragState
20 const fragment = dragState?.node
21 if (!dragState || fragment === null) {
22 return <div style={{ display: 'none' }} />
23 }
24 return (
25 <DragOverlayInternal
26 fragment={fragment}
27 initialX={0}
28 initialY={0}
29 onEndDrag={this.onEndDrag}
30 selection={selection}
31 editorRef={editorRef}
32 />
33 )
34 }
35
36 onEndDrag = () => {
37 this.props.selection.endDrag()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected