@selenite/graph-editor
Version:
A graph editor for visual programming, based on rete and svelte.
14 lines (13 loc) • 360 B
JavaScript
// import { SocketData } from './types'
import { zip } from 'lodash-es';
/**
* @param elements list of Element returned by document.elementsFromPoint
*/
export function findSocket(socketsCache, elements) {
for (const element of elements) {
const found = socketsCache.get(element);
if (found) {
return found;
}
}
}