MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / createDragSource

Function createDragSource

static/components.ts:1222–1231  ·  view source on GitHub ↗
(
    layout: GoldenLayout,
    element: HTMLElement | JQuery,
    factory: DragSourceFactory<K>,
)

Source from the content-addressed store, hash-verified

1220 * definitions don't properly type the second parameter as accepting a function.
1221 */
1222export function createDragSource<K extends keyof ComponentStateMap>(
1223 layout: GoldenLayout,
1224 element: HTMLElement | JQuery,
1225 factory: DragSourceFactory<K>,
1226): GoldenLayout.EventEmitter {
1227 // TODO(#7808): Fix GoldenLayout TypeScript definitions to eliminate 'as any' cast
1228 // Both the factory parameter type and return type are incorrectly defined
1229 const result = layout.createDragSource(element, factory as any) as any;
1230 return result._dragListener;
1231}
1232
1233/**
1234 * Validation function for component states.

Callers 7

setupAddFunction · 0.85
addPaneOpenerMethod · 0.85
initPanerButtonsMethod · 0.85
initToolButtonMethod · 0.85
bindClickToOpenPaneMethod · 0.85
registerButtonsMethod · 0.85
addCompilerPickerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected